repo_name stringlengths 7 65 | path stringlengths 5 185 | copies stringlengths 1 4 | size stringlengths 4 6 | content stringlengths 977 990k | license stringclasses 14
values | hash stringlengths 32 32 | line_mean float64 7.18 99.4 | line_max int64 31 999 | alpha_frac float64 0.25 0.95 | ratio float64 1.5 7.84 | autogenerated bool 1
class | config_or_test bool 2
classes | has_no_keywords bool 2
classes | has_few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
aldebaran/qibuild | python/qisrc/svn.py | 1 | 2923 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
""" Fake Git """
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import prin... | bsd-3-clause | 5efe987cf8815d9a19da66f228ee5636 | 36.474359 | 110 | 0.521724 | 4.199713 | false | false | false | false |
aldebaran/qibuild | python/qibuild/actions/make.py | 1 | 1462 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
""" Build a project. """
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ imp... | bsd-3-clause | d4e1f16a694bedfd718273e47bda17cc | 39.611111 | 90 | 0.645691 | 3.919571 | false | true | false | false |
aldebaran/qibuild | python/qitoolchain/feed.py | 1 | 6076 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
""" Toolchain Feeds """
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ impo... | bsd-3-clause | 818a0e975653cae8c59829687a97d167 | 35.60241 | 115 | 0.579822 | 3.927602 | false | false | false | false |
aldebaran/qibuild | python/qitoolchain/actions/update.py | 1 | 2572 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
"""
Update every toolchain using the feed that was used to create them.
If a toolchain name is given, only update this tool... | bsd-3-clause | ab250407aad44adad02c89c2e828bd9f | 41.866667 | 110 | 0.608087 | 3.833085 | false | false | false | false |
aldebaran/qibuild | python/qibuild/actions/list_binaries.py | 1 | 1312 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
"""
List every binaries in the given worktree.
Mainly useful to auto-complete ``qibuild run``.
"""
from __future__ import a... | bsd-3-clause | c3a56b45dfe0d1b9c194d22ae3061e20 | 31 | 84 | 0.637957 | 3.555556 | false | false | false | false |
aldebaran/qibuild | python/qitest/collector.py | 1 | 3424 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
""" QiTest Collector """
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ imp... | bsd-3-clause | d71b6d2d11618cef253e6b4c4a87065d | 35.817204 | 84 | 0.572722 | 3.762637 | false | true | false | false |
aldebaran/qibuild | python/qidoc/actions/open.py | 1 | 1682 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
""" Open the current documentation in a web browser. """
from __future__ import absolute_import
from __future__ import unic... | bsd-3-clause | 35d6c2c6627ddd10c8dbb33b4a48f52e | 30.735849 | 84 | 0.661118 | 3.446721 | false | false | false | false |
aldebaran/qibuild | doc/tools/cmakedomain.py | 1 | 3746 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
""" Sphinx Domain for Documenting CMake Functions """
from __future__ import absolute_import
from __future__ import unicode... | bsd-3-clause | 7de589383f9d0da8da126d9ea64705e7 | 31.573913 | 84 | 0.585424 | 4.010707 | false | false | false | false |
aldebaran/qibuild | python/qitoolchain/convert.py | 1 | 6877 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
""" Convert a Package to QiBuild """
from __future__ import absolute_import
from __future__ import unicode_literals
from __... | bsd-3-clause | 11d3134c2461e0fbb0c8433ab6a9336a | 41.450617 | 119 | 0.630798 | 3.492636 | false | false | false | false |
aldebaran/qibuild | python/qitoolchain/binary_package/core.py | 1 | 3340 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
"""
This module provides the abstract BinaryPackage class, which should be
inherited when implementing additional binary pa... | bsd-3-clause | 0586b4c29c3cf10300fa37ac9c4fd1a5 | 30.214953 | 84 | 0.603892 | 4.82659 | false | false | false | false |
aldebaran/qibuild | python/qibuild/actions/find.py | 1 | 2496 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
""" Find a package. """
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ impo... | bsd-3-clause | 1637cf72b8ce3f9de64dc7187bc55c00 | 33.191781 | 84 | 0.613782 | 3.88785 | false | false | false | false |
aldebaran/qibuild | python/qidoc/actions/clean.py | 1 | 1924 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
""" Clean the build-doc directory. """
from __future__ import absolute_import
from __future__ import unicode_literals
from ... | bsd-3-clause | fa180a067b72dc121b283876da5a552b | 32.172414 | 100 | 0.611746 | 3.630189 | false | false | false | false |
aldebaran/qibuild | python/qibuild/actions/clean.py | 1 | 4842 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
"""
Clean build directories.
By default all build directories for the current configuration
will be deleted for the specifi... | bsd-3-clause | ff27445260365fdcbf6d9b70e9fefac6 | 43.833333 | 101 | 0.62185 | 3.965602 | false | true | false | false |
aldebaran/qibuild | python/qisrc/test/test_license.py | 1 | 1879 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
""" QiBuild """
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print... | bsd-3-clause | c23d8c25387ffba5c6486d6873faded9 | 31.396552 | 84 | 0.693454 | 3.273519 | false | true | false | false |
pybrain/pybrain | pybrain/tests/unittests/structure/networks/test_swiping_network.py | 31 | 1057 | """
Build a 2-dimensional BorderSwipingNetwork:
>>> n = buildSwipingNetwork(2)
Check its gradient:
>>> from pybrain.tests import gradientCheck
>>> gradientCheck(n)
Perfect gradient
True
Try writing it to an xml file, reread it and determine if it looks the same:
>>> from pybrain.tests impo... | bsd-3-clause | ebdc021fe1a526aeed0e891859a2d067 | 23.581395 | 91 | 0.702933 | 3.5 | false | true | false | false |
pybrain/pybrain | pybrain/rl/environments/twoplayergames/twoplayergame.py | 31 | 1670 | __author__ = 'Tom Schaul, tom@idsia.ch'
from pybrain.utilities import abstractMethod
from pybrain.rl.environments import Environment
class CompetitiveEnvironment(Environment):
""" an environment in which multiple agents interact, competitively.
This class is only for conceptual grouping, it only constrains t... | bsd-3-clause | b4ccea89650f4d5e2fa9ee4050e6d378 | 32.4 | 103 | 0.65509 | 4.164589 | false | false | false | false |
pybrain/pybrain | pybrain/tools/nondominated.py | 25 | 10020 | __author__ = 'Justin Bayer, Tom Schaul, {justin,tom}@idsia.ch'
import collections
from scipy import array, tile, sum
def crowding_distance(individuals, fitnesses):
""" Crowding distance-measure for multiple objectives. """
distances = collections.defaultdict(lambda: 0)
individuals = list(individuals)
... | bsd-3-clause | 6b0820f00568787dc91472a7b83a01f9 | 33.795139 | 97 | 0.574651 | 3.510862 | false | false | false | false |
pybrain/pybrain | pybrain/rl/experiments/episodic.py | 31 | 1630 | __author__ = 'Tom Schaul, tom@idsia.ch'
from pybrain.rl.experiments.experiment import Experiment
from pybrain.rl.agents.optimization import OptimizationAgent
class EpisodicExperiment(Experiment):
""" The extension of Experiment to handle episodic tasks. """
doOptimization = False
def __init__(self, ta... | bsd-3-clause | 0c0b3929c8184af4c8a48e069274f49e | 34.434783 | 105 | 0.595706 | 4.515235 | false | false | false | false |
pybrain/pybrain | examples/rl/environments/cartpole/play_cartpole.py | 25 | 1931 | from __future__ import print_function
#!/usr/bin/env python
###########################################################################
# This program takes 4 parameters at the command line and runs the
# (single) cartpole environment with it, visualizing the cart and the pole.
# if cart is green, no penalty is given.... | bsd-3-clause | ff3812e08c909309e37d383449a2535b | 31.728814 | 109 | 0.688244 | 3.53663 | false | false | false | false |
pybrain/pybrain | pybrain/structure/modules/statedependentlayer.py | 25 | 3256 | __author__ = 'Thomas Rueckstiess, ruecksti@in.tum.de'
from scipy import random, asarray, zeros, dot
from pybrain.structure.modules.neuronlayer import NeuronLayer
from pybrain.tools.functions import expln, explnPrime
from pybrain.structure.parametercontainer import ParameterContainer
class StateDependentLayer(Neuron... | bsd-3-clause | 98dae6db1252777316342dabd2f272d3 | 38.707317 | 103 | 0.567875 | 3.908764 | false | false | false | false |
pybrain/pybrain | pybrain/optimization/distributionbased/cmaes.py | 25 | 6685 | from __future__ import print_function
__author__ = 'Tom Schaul, tom@idsia.ch; Sun Yi, yi@idsia.ch'
from numpy import floor, log, eye, zeros, array, sqrt, sum, dot, tile, outer, real
from numpy import exp, diag, power, ravel
from numpy.linalg import eig, norm
from numpy.random import randn
from pybrain.optimization.o... | bsd-3-clause | ebb28f2993c5e8116877b220f75c14b9 | 49.643939 | 133 | 0.599102 | 3.481771 | false | false | false | false |
pybrain/pybrain | pybrain/unsupervised/trainers/deepbelief.py | 26 | 4443 | # -*- coding: utf-8 -*-
__author__ = 'Justin S Bayer, bayer.justin@googlemail.com'
__version__ = '$Id$'
import copy
from pybrain.datasets import SupervisedDataSet, UnsupervisedDataSet
from pybrain.structure import BiasUnit, FeedForwardNetwork, FullConnection
from pybrain.structure.networks.rbm import Rbm
from pybra... | bsd-3-clause | 3fb39b13815b8bd073e5db89229d6455 | 37.301724 | 80 | 0.620302 | 3.911092 | false | false | false | false |
pybrain/pybrain | pybrain/rl/environments/twoplayergames/tasks/relativegomokutask.py | 25 | 4318 | from __future__ import print_function
__author__ = 'Tom Schaul, tom@idsia.ch'
from .gomokutask import GomokuTask
from pybrain.rl.environments.twoplayergames.gomokuplayers import ModuleDecidingPlayer
from pybrain.rl.environments.twoplayergames import GomokuGame
from pybrain.rl.environments.twoplayergames.gomokuplayers... | bsd-3-clause | 39740afe2bf2c86cddb51e2c2ae780a7 | 31.712121 | 94 | 0.606068 | 3.646959 | false | false | false | false |
pybrain/pybrain | pybrain/rl/environments/mazes/tasks/cheesemaze.py | 25 | 1074 | __author__ = 'Tom Schaul, tom@idsia.ch'
from scipy import zeros, array
from .maze import MazeTask
class CheeseMaze(MazeTask):
"""
#######
# #
# # # #
# #*# #
#######
"""
observations = 7
discount = 0.95
topology = array([[1] * 7,
[1, 0, 1, 0, 1, 0,... | bsd-3-clause | 0aac0158675118709d9c2ff55bffc2d1 | 22.347826 | 89 | 0.385475 | 3.225225 | false | false | false | false |
pybrain/pybrain | pybrain/structure/networks/custom/capturegame.py | 31 | 6430 | __author__ = 'Tom Schaul, tom@idsia.ch'
import random
from pybrain import SharedFullConnection, MotherConnection, MDLSTMLayer, IdentityConnection
from pybrain import ModuleMesh, LinearLayer, TanhLayer, SigmoidLayer
from pybrain.structure.networks import BorderSwipingNetwork
# TODO: incomplete implementation: missing... | bsd-3-clause | 9071bb15e517601f0030e1806f30ac66 | 41.866667 | 129 | 0.611042 | 3.935129 | false | false | false | false |
pybrain/pybrain | pybrain/structure/connections/permutation.py | 25 | 1518 | # -*- coding: utf-8 -_*-
__author__ = 'Justin Bayer, bayer.justin@googlemail.com'
__version__ = '$Id$'
from scipy import array
from pybrain.structure.connections.connection import Connection
from pybrain.utilities import permute
class PermutationConnection(Connection):
"""Connection that permutes the input by... | bsd-3-clause | c74830e4173cd8d59b76ff126f02c6f5 | 36.95 | 81 | 0.64361 | 3.833333 | false | false | false | false |
pybrain/pybrain | pybrain/structure/networks/mdrnn.py | 25 | 4540 | # -*- coding: utf-8 -*-
""" WARNING: this file is a construction site. The classes are currently placeholders for stuff to come. """
__author__ = 'Justin S Bayer, bayer.justin@googlemail.com'
__version__ = '$Id$'
import operator
import scipy
from functools import reduce
try:
from arac.pybrainbridge import _Feed... | bsd-3-clause | 20656d1cad8d8bae43928ef9736b0fed | 36.213115 | 108 | 0.636344 | 4.134791 | false | false | false | false |
pybrain/pybrain | pybrain/supervised/trainers/svmtrainer.py | 25 | 15897 | from __future__ import print_function
__author__ = "Martin Felder, felder@in.tum.de"
try:
from svm import svm_model, svm_parameter, svm_problem, cross_validation #@UnresolvedImport
from svm import C_SVC, NU_SVC, ONE_CLASS, EPSILON_SVR, NU_SVR #@UnresolvedImport @UnusedImport
from svm import LINEAR, POLY, ... | bsd-3-clause | afc99ff3ef317cc53e05a67a10749bbd | 39.553571 | 162 | 0.56237 | 3.762604 | false | false | false | false |
pybrain/pybrain | examples/optimization/multiobjective/nsga2jpq.py | 25 | 2020 | from __future__ import print_function
#!/usr/bin/env python
""" An illustration of using the NSGA-II multi-objective optimization algorithm
on Unconstrained Multi-Objective Optimization benchmark function. """
__author__ = 'Jean Pierre Queau, jeanpierre.queau@sbmoffshore.com'
from pybrain.optimization import MultiOb... | bsd-3-clause | b43952b0584430d1ab3acad525c5060d | 32.683333 | 117 | 0.713366 | 3.122102 | false | false | false | false |
pybrain/pybrain | examples/rl/environments/shipsteer/shipbench_pgpe.py | 30 | 2475 | #!/usr/bin/env python
#########################################################################
# Reinforcement Learning with PGPE on the ShipSteering Environment
#
# Requirements: pylab (for plotting only). If not available, comment the
# last 3 lines out
# Author: Frank Sehnke, sehnke@in.tum.de
######################... | bsd-3-clause | 1054182b04c3b2be7a233374eab9fe62 | 44 | 199 | 0.655758 | 4.02439 | false | false | false | false |
pybrain/pybrain | pybrain/tools/plotting/fitnessprogression.py | 25 | 4522 | from __future__ import print_function
""" a type of plots used so frequently that I think they merit their own utility """
__author__ = 'Tom Schaul, tom@idsia.ch'
import pylab
from pylab import xlabel, ylabel, legend, plot, semilogy
from scipy import array, zeros, power, log10
from pybrain.utilities import avgFound... | bsd-3-clause | 75bc70593655e6d197afe468cec9556a | 34.888889 | 111 | 0.553295 | 4.298479 | false | false | false | false |
pybrain/pybrain | pybrain/unsupervised/trainers/rbm.py | 25 | 6716 | __author__ = ('Christian Osendorfer, osendorf@in.tum.de;'
'Justin S Bayer, bayerj@in.tum.de'
'SUN Yi, yi@idsia.ch')
from scipy import random, outer, zeros, ones
from pybrain.datasets import SupervisedDataSet, UnsupervisedDataSet
from pybrain.supervised.trainers import Trainer
from pybrain.... | bsd-3-clause | d1c3d5e7d6dfddece2b67045f33d9311 | 33.979167 | 86 | 0.570429 | 3.704357 | false | false | false | false |
pybrain/pybrain | pybrain/rl/environments/cartpole/doublepole.py | 25 | 1795 | __author__ = 'Tom Schaul, tom@idsia.ch'
from .cartpole import CartPoleEnvironment
from pybrain.rl.environments import Environment
class DoublePoleEnvironment(Environment):
""" two poles to be balanced from the same cart. """
indim = 1
ooutdim = 6
def __init__(self):
self.p1 = CartPoleEnviro... | bsd-3-clause | e9e96454b0ad1ce88f4c5fed47662a1b | 32.867925 | 106 | 0.611699 | 3.499025 | false | false | false | false |
pybrain/pybrain | examples/rl/environments/maze/td.py | 30 | 2011 | #!/usr/bin/env python
__author__ = 'Thomas Rueckstiess, ruecksti@in.tum.de'
""" This example demonstrates how to use the discrete Temporal Difference
Reinforcement Learning algorithms (SARSA, Q, Q(lambda)) in a classical
fully observable MDP maze task. The goal point is the top right free
field. """
from scipy import... | bsd-3-clause | 6985e5425d6e9ded4123c1d0291a07fa | 29.014925 | 79 | 0.640477 | 3.04236 | false | false | false | false |
pybrain/pybrain | pybrain/optimization/memetic/memetic.py | 25 | 2490 | from __future__ import print_function
__author__ = 'Tom Schaul, tom@idsia.ch'
from pybrain.optimization.optimizer import BlackBoxOptimizer, TopologyOptimizer
from pybrain.optimization.hillclimber import HillClimber
from pybrain.structure.evolvables.maskedparameters import MaskedParameters
class MemeticSearch(HillCl... | bsd-3-clause | 6b02cc9dc8d9b95c1455f8e39922e72e | 39.16129 | 120 | 0.591566 | 4.462366 | false | false | false | false |
pybrain/pybrain | pybrain/optimization/finitedifference/spsa.py | 25 | 2286 | __author__ = 'Frank Sehnke, sehnke@in.tum.de, Tom Schaul'
from scipy import random
from .fd import FiniteDifferences
class SimpleSPSA(FiniteDifferences):
""" Simultaneous Perturbation Stochastic Approximation.
This class uses SPSA in general, but uses the likelihood gradient and a simpler exploration decay... | bsd-3-clause | 5180a274feeed287cbc2c250224172fb | 39.105263 | 131 | 0.650044 | 4.264925 | false | false | false | false |
pybrain/pybrain | examples/supervised/neuralnets+svm/example_rnn.py | 25 | 1624 | from __future__ import print_function
#!/usr/bin/env python
# Example script for recurrent network usage in PyBrain.
__author__ = "Martin Felder"
__version__ = '$Id$'
from pylab import plot, hold, show
from scipy import sin, rand, arange
from pybrain.datasets import SequenceClassificationDataSet
from pybra... | bsd-3-clause | 9a219540160436d13e07c2eb4ec2aac0 | 35.909091 | 133 | 0.741379 | 3.147287 | false | true | false | false |
desihub/desitarget | py/desitarget/mtl.py | 1 | 109488 | """
desitarget.mtl
==============
Merged target lists.
.. _`STRICT ISO format`: https://stackoverflow.com/a/55157458
"""
import os
import numpy as np
import healpy as hp
import numpy.lib.recfunctions as rfn
import sys
from astropy.table import Table, hstack, vstack
from astropy.io import ascii
import fitsio
from tim... | bsd-3-clause | 5ccaf04b8c58dc2b3ce09b4d6d82efaf | 41.078401 | 103 | 0.625712 | 3.592126 | false | false | false | false |
desihub/desitarget | py/desitarget/sv3/sv3_cuts.py | 1 | 96468 | """
desitarget.sv3.sv3_cuts
=======================
Target Selection for DESI Survey Validation derived from `the SV3 wiki`_.
A collection of helpful (static) methods to check whether an object's
flux passes a given selection criterion (*e.g.* LRG, ELG or QSO).
.. _`the Gaia data model`: https://gea.esac.esa.int/arc... | bsd-3-clause | e344c6ea1a330c5e1e540e3485a796d8 | 40.050213 | 150 | 0.602853 | 3.0496 | false | false | false | false |
desihub/desitarget | py/desitarget/secondary.py | 1 | 47469 | """
desitarget.secondary
====================
Modules dealing with target selection for secondary targets.
Note that the environment variable SCND_DIR should be set, and that
directory should contain files of two flavors:
(1) In $SCND_DIR/indata: .fits or .txt files defining the secondary
targets with columns co... | bsd-3-clause | 8c012d03753a6399e5f28c7a9a3abc02 | 43.034323 | 100 | 0.625524 | 3.550146 | false | false | false | false |
desihub/desitarget | py/desitarget/train/data_collection/RA_DEC_MatchingClassModule.py | 1 | 1462 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import numpy as np
from sklearn.neighbors import BallTree
class RA_DEC_MatchingClass():
def __init__(self):
self.RA_CatalogData = None
self.DEC_CatalogData = None
self.RA4MatchingData = None
self.DEC4MatchingData = None
self... | bsd-3-clause | 326796e53f27d3ef02b23f7d6132f839 | 32.813953 | 76 | 0.608666 | 3.126882 | false | false | false | false |
desihub/desitarget | py/desitarget/skyutilities/astrometry/fits.py | 1 | 20780 | # This code is from astrometry.net:
# https://github.com/dstndstn/astrometry.net
# as of version 0.74 (git hash a65e168d).
# This file (util/fits.py) is licensed under the BSD-3 license.
"""
=======================================
desitarget.skyutilities.astrometry.fits
=======================================
Modul... | bsd-3-clause | 9737e4f877de0b8a62f2a2f2e22bb809 | 31.367601 | 140 | 0.456497 | 4.112408 | false | false | false | false |
desihub/desitarget | py/desitarget/cmx/ms_cuts.py | 1 | 30030 | """
desitarget.cuts
===============
An old copy of the Main Survey cuts (../cuts.py) that were used for commissioning (cmx).
.. _`the Gaia data model`: https://gea.esac.esa.int/archive/documentation/GDR2/Gaia_archive/chap_datamodel/sec_dm_main_tables/ssec_dm_gaia_source.html
.. _`the Legacy Surveys`: http://www.legac... | bsd-3-clause | f4c21db25a6eda82e922855fb9a93e21 | 38.774834 | 150 | 0.588878 | 3.040397 | false | false | false | false |
desihub/desitarget | py/desitarget/train/data_preparation/make_test_sample.py | 1 | 4464 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ****************************************
# MAKE TEST SAMPLE
# ****************************************
import argparse
import numpy as np
import astropy.io.fits as pyfits
from desitarget.train.data_preparation.funcs import Flux2MagFunc, ColorsFunc, AreaFunc
def make... | bsd-3-clause | f0f0395c07d13895b28741cc30d50b00 | 37.817391 | 102 | 0.554659 | 2.619718 | false | false | false | false |
mozilla/relman-auto-nag | auto_nag/scripts/workflow/p1_no_assignee.py | 1 | 3281 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
from libmozdata import utils as lmdutils
from auto_nag import utils
from auto_nag.bzcleaner import BzCleaner
from auto_... | bsd-3-clause | 7ca9d369c0543ea00c046324d09cc201 | 29.100917 | 86 | 0.598293 | 3.543197 | false | false | false | false |
mozilla/relman-auto-nag | auto_nag/scripts/reminder.py | 1 | 5242 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
import re
from dateutil.parser import ParserError
from libmozdata import utils as lmdutils
from libmozdata.bugzilla imp... | bsd-3-clause | ac5f7522486c3f84ac17a6bdf26f0f1e | 32.388535 | 89 | 0.52995 | 3.903202 | false | false | false | false |
mozilla/relman-auto-nag | auto_nag/scripts/several_dups.py | 1 | 1499 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
from auto_nag import utils
from auto_nag.bzcleaner import BzCleaner
class SeveralDups(BzCleaner):
def __init__(sel... | bsd-3-clause | eab0a4eb3f1ddf6cd0291d36174e8a61 | 30.893617 | 81 | 0.551034 | 3.406818 | false | false | false | false |
guillermooo/dart-sublime-bundle | lib/path.py | 3 | 2200 | # Copyright (c) 2014, Guillermo López-Anglada. Please see the AUTHORS file for details.
# All rights reserved. Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.)
from functools import wraps
import os
from sublime import View
from Dart.sublime_plugin_lib.path import e... | bsd-3-clause | a4b422aacf78b00a57d78938c2e6255c | 26.148148 | 87 | 0.645748 | 3.541063 | false | false | false | false |
guillermooo/dart-sublime-bundle | polymer.py | 3 | 2152 | # Copyright (c) 2014, Guillermo López-Anglada. Please see the AUTHORS file for details.
# All rights reserved. Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.)
import sublime
import sublime_plugin
import os
from Dart.lib.pub_package import PubPackage
from Dart.lib.... | bsd-3-clause | 0a69e043426c068f07019f1f02aea7b6 | 31.590909 | 87 | 0.665272 | 3.80708 | false | false | false | false |
guillermooo/dart-sublime-bundle | lib/editor_context.py | 3 | 1980 | # Copyright (c) 2014, Guillermo López-Anglada. Please see the AUTHORS file for details.
# All rights reserved. Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.)
'''
Holds state about the editor.
'''
from collections import defaultdict
import threading
from Dart.subl... | bsd-3-clause | dfba19e443532278a3f0467068f0cc0a | 28.537313 | 87 | 0.639212 | 4.183932 | false | false | false | false |
swistakm/pyimgui | doc/examples/integrations_pygame.py | 1 | 1469 | from __future__ import absolute_import
import sys
import pygame
import OpenGL.GL as gl
from imgui.integrations.pygame import PygameRenderer
import imgui
def main():
pygame.init()
size = 800, 600
pygame.display.set_mode(size, pygame.DOUBLEBUF | pygame.OPENGL | pygame.RESIZABLE)
imgui.create_contex... | bsd-3-clause | 481464ac1db877d537ee311a9e2626d0 | 21.953125 | 86 | 0.550034 | 3.556901 | false | false | false | false |
astropy/photutils | photutils/segmentation/catalog.py | 2 | 126950 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides tools for calculating the properties of sources
defined by a segmentation image.
"""
import functools
import inspect
import warnings
from copy import deepcopy
import astropy.units as u
import numpy as np
from astropy.stats import... | bsd-3-clause | 752ac4acb0dd650ec1a11812aea6ff11 | 35.51136 | 116 | 0.575691 | 4.151542 | false | false | false | false |
astropy/photutils | photutils/aperture/stats.py | 2 | 57269 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides tools for calculating the properties of sources
defined by an Aperture.
"""
import functools
import inspect
import warnings
from copy import deepcopy
import astropy.units as u
import numpy as np
from astropy.nddata import NDData,... | bsd-3-clause | 771276ca3077d009f8ebd877b253ed4c | 33.561859 | 85 | 0.573417 | 4.018877 | false | false | false | false |
astropy/photutils | photutils/utils/errors.py | 2 | 7764 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides tools for calculating total error arrays.
"""
import astropy.units as u
import numpy as np
from astropy.utils.misc import isiterable
__all__ = ['calc_total_error']
def calc_total_error(data, bkg_error, effective_gain):
r"""... | bsd-3-clause | c7d52a613a430a897f8ca3c7ab5a58a6 | 40.518717 | 79 | 0.631891 | 3.57953 | false | false | false | false |
astropy/photutils | photutils/utils/tests/test_quantity_helpers.py | 2 | 1489 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests for the _quantity_helpers module.
"""
import astropy.units as u
import numpy as np
import pytest
from numpy.testing import assert_equal
from photutils.utils._quantity_helpers import process_quantities
@pytest.mark.parametrize('all_units', (Fa... | bsd-3-clause | 24cf542d1d4cd0599b9f685d16d8251b | 26.574074 | 68 | 0.584956 | 2.966135 | false | true | false | false |
astropy/photutils | photutils/aperture/ellipse.py | 2 | 21551 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module defines elliptical and elliptical-annulus apertures in both
pixel and sky coordinates.
"""
import math
import astropy.units as u
import numpy as np
from photutils.aperture.attributes import (PixelPositions, PositiveScalar,
... | bsd-3-clause | 9397b94aea6abdb0a4f9bac79eec68c1 | 35.839316 | 95 | 0.575658 | 4.019959 | false | false | false | false |
astropy/photutils | photutils/geometry/tests/test_elliptical_overlap_grid.py | 2 | 1217 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests for the elliptical_overlap_grid module.
"""
import itertools
import pytest
from numpy.testing import assert_allclose
from photutils.geometry import elliptical_overlap_grid
grid_sizes = [50, 500, 1000]
maj_sizes = [0.2, 0.4, 0.8]
min_sizes = [... | bsd-3-clause | 16531f800a2724d9766a5e2e919007d6 | 33.771429 | 78 | 0.549712 | 3.487106 | false | true | false | false |
astropy/photutils | photutils/background/interpolators.py | 2 | 6202 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module defines interpolator classes for Background2D.
"""
import numpy as np
from photutils.utils import ShepardIDWInterpolator
__all__ = ['BkgZoomInterpolator', 'BkgIDWInterpolator']
__doctest_requires__ = {('BkgZoomInterpolator'): ['scipy']}... | bsd-3-clause | f366eff7ba4dcb2d7a36ed0b1d88292d | 34.238636 | 78 | 0.606901 | 4.00129 | false | false | false | false |
astropy/photutils | photutils/aperture/core.py | 2 | 29592 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module defines the base aperture classes.
"""
import abc
import inspect
from copy import deepcopy
import astropy.units as u
import numpy as np
from astropy.coordinates import SkyCoord
from astropy.utils import lazyproperty
from astropy.utils.dec... | bsd-3-clause | b0a7c690af90fb866b37a85a77318182 | 35.264706 | 95 | 0.567417 | 4.379458 | false | false | false | false |
astropy/photutils | photutils/background/background_2d.py | 2 | 28358 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module defines classes to estimate the 2D background and background
RMS in an image.
"""
import warnings
import astropy.units as u
import numpy as np
from astropy.nddata import NDData
from astropy.stats import SigmaClip
from astropy.utils import... | bsd-3-clause | e563802a3b93e17b92b7996bc72cd11f | 38.884669 | 78 | 0.602863 | 4.172135 | false | false | false | false |
astropy/photutils | photutils/isophote/tests/test_model.py | 1 | 3304 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests for the model module.
"""
import warnings
import numpy as np
import pytest
from astropy.io import fits
from astropy.utils.data import get_pkg_data_filename
from photutils.datasets import get_path
from photutils.isophote.ellipse import Ellipse
... | bsd-3-clause | a3e4f2a51556a556142410c8cf14097c | 36.123596 | 77 | 0.648608 | 3.320603 | false | true | false | false |
astropy/photutils | photutils/isophote/ellipse.py | 2 | 34015 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides a class to fit elliptical isophotes.
"""
import warnings
import numpy as np
from astropy.utils.exceptions import AstropyUserWarning
from photutils.isophote.fitter import (DEFAULT_CONVERGENCE, DEFAULT_FFLAG,
... | bsd-3-clause | 422e1c1b626390917c9b239922f42e25 | 47.179887 | 81 | 0.629546 | 4.350857 | false | false | false | false |
pallets/flask | src/flask/__init__.py | 1 | 2894 | from markupsafe import escape
from markupsafe import Markup
from . import json as json
from .app import Flask as Flask
from .app import Request as Request
from .app import Response as Response
from .blueprints import Blueprint as Blueprint
from .config import Config as Config
from .ctx import after_this_request as aft... | bsd-3-clause | f4ac089677131abdca29a314ca6f679c | 39.760563 | 83 | 0.762267 | 4.182081 | false | false | false | false |
h5py/h5py | examples/swmr_inotify_example.py | 1 | 2673 |
"""
Demonstrate the use of h5py in SWMR mode to monitor the growth of a dataset
on notification of file modifications.
This demo uses pyinotify as a wrapper of Linux inotify.
https://pypi.python.org/pypi/pyinotify
Usage:
swmr_inotify_example.py [FILENAME [DATASETNAME]]
... | bsd-3-clause | 484262387a52b2d4225abeb5802ad6bf | 30.821429 | 93 | 0.653947 | 3.521739 | false | false | false | false |
h5py/h5py | docs_api/automod.py | 1 | 7563 |
"""
Requires patched version of autodoc.py
http://bugs.python.org/issue3422
"""
import re
from functools import partial
# === Regexp replacement machinery ============================================
role_expr = re.compile(r"(:.+:(?:`.+`)?)")
def safe_replace(istr, expr, rpl):
""" Perform a role-safe re... | bsd-3-clause | 2f7f93621e78ea15b63cae4e9f84da0c | 28.313953 | 79 | 0.501917 | 3.455002 | false | false | false | false |
pecan/pecan | docs/source/conf.py | 2 | 7408 | # -*- coding: utf-8 -*-
#
# Pecan documentation build configuration file, created by
# sphinx-quickstart on Sat Oct 9 14:41:27 2010.
#
# This file is execfile()d w/ the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All con... | bsd-3-clause | 7a40ceacea830e11b7ec9bac340bc5e6 | 31.491228 | 79 | 0.705589 | 3.678252 | false | true | false | false |
epfl-lts2/pygsp | pygsp/filters/expwin.py | 1 | 2650 | # -*- coding: utf-8 -*-
from __future__ import division
import numpy as np
from . import Filter # prevent circular import in Python < 3.5
class Expwin(Filter):
r"""Design an exponential window filter.
The window has the shape of a (half) triangle with the corners smoothed by
an exponential function.
... | bsd-3-clause | e609bd1691d8222e8993f9e265db3250 | 29.113636 | 78 | 0.557736 | 3.557047 | false | false | false | false |
epfl-lts2/pygsp | pygsp/graphs/nngraphs/sensor.py | 1 | 2564 | # -*- coding: utf-8 -*-
from __future__ import division
import numpy as np
from pygsp.graphs import NNGraph # prevent circular import in Python < 3.5
class Sensor(NNGraph):
r"""Random sensor graph.
The sensor graph is built by randomly picking ``N`` points on the [0, 1] x
[0, 1] plane and connecting ... | bsd-3-clause | 76acad8ccb83ae590f2f31f67ef9e410 | 29.164706 | 79 | 0.548752 | 3.726744 | false | false | false | false |
epfl-lts2/pygsp | pygsp/graphs/comet.py | 1 | 1935 | # -*- coding: utf-8 -*-
import numpy as np
from scipy import sparse
from . import Graph # prevent circular import in Python < 3.5
class Comet(Graph):
r"""Comet graph.
The comet is a path graph with a star of degree `k` at one end.
Equivalently, the comet is a star made of `k` branches, where a branch ... | bsd-3-clause | 5d416787b7aed97491f0da970cfb84b9 | 27.043478 | 77 | 0.519897 | 3.246644 | false | false | false | false |
epfl-lts2/pygsp | pygsp/filters/filter.py | 1 | 27426 | # -*- coding: utf-8 -*-
from functools import partial
import numpy as np
from pygsp import utils
# prevent circular import in Python < 3.5
from . import approximations
from ..graphs import Graph
_logger = utils.build_logger(__name__)
class Filter(object):
r"""
The base Filter class.
* Provide a comm... | bsd-3-clause | bc6970cbffb800e2cabd6ea857f75abb | 35.182058 | 79 | 0.531284 | 3.640781 | false | false | false | false |
bnoordhuis/gyp | pylib/gyp/ninja_syntax.py | 2476 | 5536 | # This file comes from
# https://github.com/martine/ninja/blob/master/misc/ninja_syntax.py
# Do not edit! Edit the upstream one instead.
"""Python module for generating .ninja files.
Note that this is emphatically not a required piece of Ninja; it's
just a helpful utility for build-file-generation systems that alr... | bsd-3-clause | 7079ef36998294f144945075cf37adb2 | 33.6 | 80 | 0.551662 | 3.959943 | false | false | false | false |
bnoordhuis/gyp | tools/pretty_sln.py | 1820 | 5099 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Prints the information in a sln file in a diffable way.
It first outputs each projects in alphabetical order with their
dependenci... | bsd-3-clause | dc0e8b27217dfb0d7b26e563950ac3dd | 29.171598 | 80 | 0.569523 | 4.062948 | false | false | false | false |
bnoordhuis/gyp | pylib/gyp/mac_tool.py | 8 | 27050 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utility functions to perform Xcode-style build steps.
These functions are executed via gyp-mac-tool when using the Makefile generator.
""... | bsd-3-clause | f73c39b6261ad7d10321723a4dc7a866 | 36.77933 | 105 | 0.657043 | 3.846701 | false | false | false | false |
bnoordhuis/gyp | tools/pretty_gyp.py | 20 | 4728 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Pretty-prints the contents of a GYP file."""
import sys
import re
# Regex to remove comments when we're counting braces.
COMMENT_RE = ... | bsd-3-clause | 5a41df392eda5ca59d5105606afc970e | 29.701299 | 80 | 0.627327 | 3.360341 | false | false | false | false |
tulip-control/tulip-control | tulip/interfaces/slugs.py | 1 | 8160 | # Copyright (c) 2014, 2015 by California Institute of Technology
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice... | bsd-3-clause | 63602ab1076eedc6332173c186a56312 | 35.106195 | 79 | 0.641054 | 3.655914 | false | false | false | false |
tulip-control/tulip-control | examples/gr1_set.py | 1 | 3468 | #!/usr/bin/env python
"""Direct GR(1) specification, with integer-valued variable to model location.
This example illustrates the use of TuLiP to synthesize a reactive
controller for a GR(1) specification. We code the specification
directly in GR(1) form and then use TuLiP to synthesize a reactive
controller.
The sy... | bsd-3-clause | 4a3557ed0ac1d8cbbce9972570c07b94 | 28.641026 | 78 | 0.645905 | 3.178735 | false | false | false | false |
tulip-control/tulip-control | tulip/transys/mathfunc.py | 1 | 8696 | # Copyright (c) 2020 by California Institute of Technology
# and Iowa State University
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above... | bsd-3-clause | 0e6394e081b49f12fcf8268cee35ed48 | 35.384937 | 76 | 0.600276 | 4.042771 | false | false | false | false |
tulip-control/tulip-control | examples/developer/switch.py | 1 | 1885 | """
Simple example with uncontrolled switching, for debugging
6 cell robot example.
+---+---+---+
| 3 | 4 | 5 |
+---+---+---+
| 0 | 1 | 2 |
+---+---+---+
"""
from __future__ import print_function
from tulip import spec, synth, transys
import numpy as np
from scipy import sparse as sp
sys_sw... | bsd-3-clause | cc47879e31f03e5b3ae858a4be72a2bf | 24.821918 | 66 | 0.57878 | 2.904468 | false | false | false | false |
tulip-control/tulip-control | tulip/interfaces/gr1py.py | 1 | 3186 | # Copyright (c) 2015 by California Institute of Technology
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this... | bsd-3-clause | 4576d8b69e4b625716f4cbaa43d1a973 | 35.62069 | 73 | 0.7285 | 3.683237 | false | false | false | false |
tulip-control/tulip-control | tests/abstract_test.py | 1 | 11386 | """
Tests for the abstraction from continuous dynamics to logic
"""
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
# logging.getLogger('tulip').setLevel(logging.ERROR)
logger.setLevel(logging.DEBUG)
import pytest
import matplotlib
# to avoid the need for using: ssh -X when... | bsd-3-clause | bb03b50fc47a2fdf4ba8432382ced85a | 28.72846 | 81 | 0.570789 | 2.965877 | false | false | false | false |
tulip-control/tulip-control | tulip/transys/products.py | 1 | 14093 | # Copyright (c) 2013-2015 by California Institute of Technology
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice,... | bsd-3-clause | c70f4cf70ecb0446bce93d8471785852 | 32.16 | 73 | 0.583978 | 3.667187 | false | false | false | false |
tulip-control/tulip-control | tulip/interfaces/ltl2ba.py | 1 | 8389 | # Copyright (c) 2014, 2015 by California Institute of Technology
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice... | bsd-3-clause | 8f830f60c17938cf9cd03bf05bcf6b82 | 27.927586 | 73 | 0.553105 | 3.287226 | false | false | false | false |
tulip-control/tulip-control | tests/gridworld_test.py | 1 | 13933 | """Tests for the tulip.gridworld."""
from __future__ import division
from __future__ import print_function
try:
from dd import cudd as dd_cudd
except ImportError:
dd_cudd = None
import numpy as np
import pytest
import tulip.gridworld as gw
import unittest
from tulip.synth import is_realizable
REFERENCE_GWFI... | bsd-3-clause | 10815da22c13d5ca7f548a1c51262913 | 39.268786 | 80 | 0.541377 | 2.768329 | false | true | false | false |
tulip-control/tulip-control | tulip/transys/labeled_graphs.py | 1 | 44682 | # Copyright (c) 2013-2015 by California Institute of Technology
# and 2014 The Regents of the University of Michigan
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of sou... | bsd-3-clause | b7a57d0ecf9450df9d37ec86940bba60 | 32.824375 | 81 | 0.558279 | 4.070882 | false | false | false | false |
tulip-control/tulip-control | tulip/transys/graph_algorithms.py | 1 | 4257 | # Copyright (c) 2020 by California Institute of Technology
# and University of Texas at Austin
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain t... | bsd-3-clause | 1a219f525cc5133920ce1bbb45436189 | 39.160377 | 87 | 0.68358 | 4.16129 | false | false | false | false |
tulip-control/tulip-control | tests/prop2part_test.py | 1 | 1768 | #!/usr/bin/env python
"""
Tests for abstract.prop2partition
"""
from __future__ import print_function
from tulip.abstract import prop2part
import polytope as pc
import numpy as np
def prop2part_test():
state_space = pc.Polytope.from_box(np.array([[0., 2.],[0., 2.]]))
cont_props = []
A = []
b = []
... | bsd-3-clause | 6fc607b92fe3d6e1df5ebef4534c14b2 | 27.983607 | 78 | 0.553733 | 3.053541 | false | false | false | false |
conda-forge/conda-smithy | conda_smithy/_version.py | 2 | 20167 | # This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains th... | bsd-3-clause | b34b4b7bf8fa438e29387ab551fefd0f | 30.96038 | 79 | 0.569594 | 3.86193 | false | false | false | false |
conda-forge/conda-smithy | conda_smithy/update_cb3.py | 3 | 19734 | import io
import re
import jinja2
import os
import ruamel.yaml
import collections
import requests
import tempfile
import tarfile
import zipfile
from .utils import tmp_directory, render_meta_yaml
class Str(ruamel.yaml.scalarstring.ScalarString):
__slots__ = "lc"
style = ""
def __new__(cls, value):
... | bsd-3-clause | 0f3f539e6057922f10f58527c6fa716d | 33.141869 | 96 | 0.444765 | 4.2928 | false | false | false | false |
conda-forge/conda-smithy | conda_smithy/feedstock_content/build-locally.py | 15 | 3231 | #!/usr/bin/env python3
#
# This file has been generated by conda-smithy in order to build the recipe
# locally.
#
import os
import glob
import subprocess
from argparse import ArgumentParser
import platform
def setup_environment(ns):
os.environ["CONFIG"] = ns.config
os.environ["UPLOAD_PACKAGES"] = "False"
... | bsd-3-clause | 7ee44bc3deef17903440f453bcdc2886 | 29.771429 | 101 | 0.593624 | 3.634421 | false | true | false | false |
aiortc/aiortc | tests/test_rtcpeerconnection.py | 1 | 183371 | import asyncio
import re
from unittest import TestCase
import aioice.ice
import aioice.stun
from aiortc import (
RTCConfiguration,
RTCIceCandidate,
RTCPeerConnection,
RTCSessionDescription,
)
from aiortc.contrib.media import MediaPlayer
from aiortc.exceptions import (
InternalError,
InvalidAcc... | bsd-3-clause | 908ce52bda676bfa092ba29da367c5e6 | 35.777176 | 88 | 0.608199 | 3.879882 | false | false | false | false |
aiortc/aiortc | src/aiortc/rtcrtpparameters.py | 1 | 4608 | from dataclasses import dataclass, field
from typing import Dict, List, Optional, Union
ParametersDict = Dict[str, Union[int, str, None]]
@dataclass
class RTCRtpCodecCapability:
"""
The :class:`RTCRtpCodecCapability` dictionary provides information on
codec capabilities.
"""
mimeType: str
"T... | bsd-3-clause | c3ac0173815525470b01b4d397c7523c | 26.266272 | 91 | 0.707682 | 3.859296 | false | false | false | false |
mininet/mininet | examples/sshd.py | 1 | 3103 | #!/usr/bin/env python
"""
Create a network and start sshd(8) on each host.
While something like rshd(8) would be lighter and faster,
(and perfectly adequate on an in-machine network)
the advantage of running sshd is that scripts can work
unchanged on mininet and hardware.
In addition to providing ssh access to hosts... | bsd-3-clause | 97962e599665233a32fbd1e282fba30e | 35.505882 | 73 | 0.665807 | 3.526136 | false | false | false | false |
jni/skan | benchmarks/bench_skan.py | 1 | 1819 | import os
from contextlib import contextmanager
from collections import OrderedDict
from time import process_time
import numpy as np
from skan import csr
rundir = os.path.dirname(__file__)
@contextmanager
def timer():
time = []
t0 = process_time()
yield time
t1 = process_time()
time.append(t1 ... | bsd-3-clause | 990ac02dd88ff131e7bf0db860fd82a4 | 27.873016 | 73 | 0.626718 | 3.4 | false | false | false | false |
jni/skan | src/skan/csr.py | 1 | 43639 | import numpy as np
import pandas as pd
from scipy import sparse, ndimage as ndi
from scipy.sparse import csgraph
from scipy.spatial import distance_matrix
from skimage import morphology
from skimage.graph import central_pixel
from skimage.util._map_array import map_array, ArrayMap
import numba
import warnings
from .np... | bsd-3-clause | 76e94cb8453c64ef96fa22214c79aada | 36.10119 | 84 | 0.61619 | 3.937105 | false | false | false | false |
poldracklab/mriqc | mriqc/interfaces/common/conform_image.py | 2 | 4779 | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
#
# Copyright 2021 The NiPreps Developers <nipreps@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may... | bsd-3-clause | 5ec379c78723999c7a91758e67cc01a8 | 26.308571 | 88 | 0.62105 | 3.719066 | false | false | false | false |
poldracklab/mriqc | mriqc/__init__.py | 1 | 1201 | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
#
# Copyright 2021 The NiPreps Developers <nipreps@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may... | bsd-3-clause | 8e2e68065791e7027fb7320a4a665d47 | 35.393939 | 74 | 0.715237 | 3.532353 | false | false | false | false |
lepinkainen/pyfibot | pyfibot/modules/module_fmi.py | 1 | 4590 | # -*- encoding: utf-8 -*-
from __future__ import unicode_literals, print_function, division
from datetime import datetime, timedelta
from bs4 import BeautifulSoup
from math import isnan
global default_place
default_place = "Helsinki"
# Time format for the API
TIME_FORMAT = "%Y-%m-%dT%H:%M:%S"
# t2m = temperature
# ws... | bsd-3-clause | 60ed763414d295751e311e82a8a1ca1f | 30.013699 | 78 | 0.607995 | 2.793337 | false | false | false | false |
lepinkainen/pyfibot | pyfibot/modules/module_urltitle.py | 1 | 48631 | # -*- coding: utf-8 -*-
# pylint: disable=unused-variable
"""Displays HTML page titles
Smart title functionality for sites which could have clear titles,
but still decide show idiotic bulk data in the HTML title element
"""
from __future__ import unicode_literals, print_function, division
import fnmatch
import urlpa... | bsd-3-clause | f858903ca46897c1e3ada29ac50b3c6b | 31.628859 | 152 | 0.554991 | 3.561424 | false | false | false | false |
lepinkainen/pyfibot | pyfibot/botcore.py | 1 | 24785 | # -*- coding: utf-8 -*-
# pylint: disable=unused-variable,no-member
"""
Bot core
@author Riku 'Shrike' Lindblad (shrike@addiktit.net)
@copyright Copyright (c) 2004 Riku Lindblad
@license New-Style BSD
"""
from __future__ import print_function, division
# twisted imports
from twisted.words.protocols import irc
from... | bsd-3-clause | ece2c56a4da7d2cb0b0a71bb0995a943 | 34.508596 | 99 | 0.555497 | 4.144649 | false | false | false | false |
lepinkainen/pyfibot | pyfibot/modules/available/module_autoop_old.py | 1 | 8277 | """
Commands:
.autoop add/del/status/list
.op
Nick-format: nick!ident@example.org
Supports adding/deleting multiple autoop-rules:
.autoop add #testchannel firstNick!ident@example.org secNick!ident@example.org
In add/del #channel needed, if changes done in query. If changes are made in #channel, defaults to current #... | bsd-3-clause | a39b863c32a4c2b3b875d431555b863a | 32.108 | 116 | 0.480609 | 3.998551 | false | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.