text
stringlengths
0
1.05M
meta
dict
# baud.py Test uasyncio at high baudrate import pyb import uasyncio as asyncio import utime import as_drivers.as_rwGPS as as_rwGPS # Outcome # Sleep Buffer # 0 None OK, length limit 74 # 10 None Bad: length 111 also short weird RMC sentences # 10 1000 OK, length 74, 37 # 10 200 Bad: 100, 37 ov...
{ "repo_name": "peterhinch/micropython-async", "path": "v3/as_drivers/as_GPS/baud.py", "copies": "1", "size": "1640", "license": "mit", "hash": -6105258817496465000, "line_mean": 28.8181818182, "line_max": 73, "alpha_frac": 0.6542682927, "autogenerated": false, "ratio": 3.0654205607476634, "conf...
"""bayabill URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-ba...
{ "repo_name": "rapidevelop/bayabill", "path": "bayabill/urls.py", "copies": "1", "size": "1129", "license": "mit", "hash": -5603416062448389000, "line_mean": 32.2058823529, "line_max": 77, "alpha_frac": 0.6820194863, "autogenerated": false, "ratio": 3.473846153846154, "config_test": false, "h...
"""Bay Bridge simulation.""" import os import urllib.request from flow.core.params import SumoParams, EnvParams, NetParams, InitialConfig, \ SumoCarFollowingParams, SumoLaneChangeParams, InFlows from flow.core.params import VehicleParams from flow.core.params import TrafficLightParams from flow.core.experiment i...
{ "repo_name": "cathywu/flow", "path": "examples/sumo/bay_bridge.py", "copies": "1", "size": "5931", "license": "mit", "hash": -5307597553539730000, "line_mean": 28.0735294118, "line_max": 79, "alpha_frac": 0.5732591469, "autogenerated": false, "ratio": 3.7138384470882904, "config_test": false, ...
"""Bay Bridge toll example.""" import os import urllib.request from flow.core.params import SumoParams, EnvParams, NetParams, InitialConfig, \ SumoLaneChangeParams, SumoCarFollowingParams, InFlows from flow.core.params import VehicleParams from flow.core.experiment import Experiment from flow.envs.bay_bridge.bas...
{ "repo_name": "cathywu/flow", "path": "examples/sumo/bay_bridge_toll.py", "copies": "1", "size": "3845", "license": "mit", "hash": -7958088115318560000, "line_mean": 28.1287878788, "line_max": 79, "alpha_frac": 0.644993498, "autogenerated": false, "ratio": 3.5405156537753224, "config_test": fal...
# bayesAgents.py # -------------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to http://ai.berkeley.e...
{ "repo_name": "omardroubi/Artificial-Intelligence", "path": "Projects/Project4/bayesAgents.py", "copies": "1", "size": "18932", "license": "apache-2.0", "hash": -384360999060752400, "line_mean": 38.1157024793, "line_max": 114, "alpha_frac": 0.6510669765, "autogenerated": false, "ratio": 3.5473112...
"""Bayes - determine spam likelihood using a Bayesian classifier. This is a Bayesian-style probabilistic classifier, using an algorithm based on the one detailed in Paul Graham's "A Plan For Spam" paper at: http://www.paulgraham.com/spam.html It also incorporates some other aspects taken from Graham Robinson's webpa...
{ "repo_name": "SpamExperts/OrangeAssassin", "path": "oa/plugins/bayes.py", "copies": "2", "size": "52828", "license": "apache-2.0", "hash": 9145937166738026000, "line_mean": 37.3089195069, "line_max": 187, "alpha_frac": 0.5563716211, "autogenerated": false, "ratio": 3.416634329323503, "config_t...
#Bayes Distribution Classifier #One classifier per class- each is just a binary classifier. import nltk import random rw_cards = [ card.replace(" ", "_") for card in [ "fool", "magician", "high priestess", "empress", "emperor", "hierophant","lovers", "chariot", "strength","hermit", "wheel of fortune", "justice",...
{ "repo_name": "pgulley/tarot-nlp", "path": "dist_bayes.py", "copies": "1", "size": "3714", "license": "mit", "hash": 1013386900187637500, "line_mean": 30.218487395, "line_max": 118, "alpha_frac": 0.6532040926, "autogenerated": false, "ratio": 2.8880248833592534, "config_test": true, "has_no_k...
# bayes_exp.py # Ronald L. Rivest and Emily Shen # 5/31/12 # Code for working with ``Bayes Post-Election Audits'' # Specifically: for running experiments # The auditing code itself in in bayes.py # For efficiency reasons, it is recommended to run this code with # "pypy" instead of the standard python interpreter....
{ "repo_name": "ron-rivest/2017-bayes-audit", "path": "from-2012-bayes-audit/bayes_exp.py", "copies": "1", "size": "32255", "license": "mit", "hash": -4564403281202859500, "line_mean": 41.7218543046, "line_max": 149, "alpha_frac": 0.5574329561, "autogenerated": false, "ratio": 3.0013026891225456, ...
## BAYESIAN ANALYSIS FOR PERIODOGRAMS # # # # # TO DO LIST: # - add functionality for mixture models/QPOs to mlprior # - add logging # - add smoothing to periodograms to pick out narrow signals # - add proposal distributions to emcee implementation beyond Gaussian # #!/usr/bin/env python from __future__ import print_fu...
{ "repo_name": "dhuppenkothen/BayesPSD", "path": "BayesPSD/bayes.py", "copies": "1", "size": "47442", "license": "bsd-2-clause", "hash": -2863899699621350000, "line_mean": 42.7656826568, "line_max": 569, "alpha_frac": 0.554951309, "autogenerated": false, "ratio": 3.466968722595732, "config_test"...
# Bayesian Binary logistic regression in 1d for iris flowers # Code is based on # https://github.com/aloctavodia/BAP/blob/master/code/Chp4/04_Generalizing_linear_models.ipynb import pymc3 as pm import numpy as np import pandas as pd import theano.tensor as tt #import seaborn as sns import scipy.stats as stats from s...
{ "repo_name": "probml/pyprobml", "path": "scripts/logreg_iris_bayes_1d_pymc3.py", "copies": "1", "size": "2690", "license": "mit", "hash": -6731460946902615000, "line_mean": 26.5670103093, "line_max": 94, "alpha_frac": 0.6071829405, "autogenerated": false, "ratio": 2.5384615384615383, "config_t...
# Bayesian Binary logistic regression in 2d for iris flwoers # Code is based on # https://github.com/aloctavodia/BAP/blob/master/code/Chp4/04_Generalizing_linear_models.ipynb import pymc3 as pm import numpy as np import pandas as pd import theano.tensor as tt #import seaborn as sns import scipy.stats as stats from s...
{ "repo_name": "probml/pyprobml", "path": "scripts/logreg_iris_bayes_2d_pymc3.py", "copies": "1", "size": "2107", "license": "mit", "hash": 9028580673305341000, "line_mean": 25.7948717949, "line_max": 94, "alpha_frac": 0.6258373206, "autogenerated": false, "ratio": 2.638888888888889, "config_tes...
"""Bayesian confirmatory factor analysis in PyMC3. """ import numpy as np import pandas as pd import pymc3 as pm import theano.tensor as tt from os.path import exists from pymc3.math import matrix_dot from fmt_val_latex import format_for_latex def bcfa(Y, M): r"""Constructs a Bayesian confirmatory factor anal...
{ "repo_name": "sammosummo/sammosummo.github.io", "path": "assets/_scripts/bcfa.py", "copies": "1", "size": "5447", "license": "mit", "hash": -7145635346555535000, "line_mean": 29.9488636364, "line_max": 88, "alpha_frac": 0.4727372866, "autogenerated": false, "ratio": 3.638610554442218, "config_...
# bayesiandb.py # old bailey # # naive bayesian learner # adapted from Segaran, Programming Collective Intelligence, Ch. 6 # persists training info in SQLite DB from pysqlite2 import dbapi2 as sqlite stopwords = ['a', 'about', 'above', 'across', 'after', 'afterwards'] stopwords += ['again', 'against', 'all'...
{ "repo_name": "williamjturkel/Digital-History-Hacks--2005-08-", "path": "bayesiandb.py", "copies": "1", "size": "11273", "license": "mit", "hash": 2075688552119391700, "line_mean": 39.4448529412, "line_max": 110, "alpha_frac": 0.5960259026, "autogenerated": false, "ratio": 3.205288598237134, "c...
""" Bayesian Determinisitc Policy Gradient evaluated on th didactic "chain" environment """ import tensorflow as tf from tensorflow.python.layers.utils import smart_cond from tensorflow.python.ops.variable_scope import get_local_variable import chi from chi import Experiment from chi import experiment, model from chi...
{ "repo_name": "rmst/chi", "path": "examples/experimental/bdpg_chains.py", "copies": "1", "size": "2827", "license": "mit", "hash": 7088494371311897000, "line_mean": 31.125, "line_max": 129, "alpha_frac": 0.6667845773, "autogenerated": false, "ratio": 3.030010718113612, "config_test": false, "...
"""Bayesian estimation for two groups This module implements Bayesian estimation for two groups, providing complete distributions for effect size, group means and their difference, standard deviations and their difference, and the normality of the data. Based on: Kruschke, J. (2012) Bayesian estimation supersedes th...
{ "repo_name": "strawlab/best", "path": "best/__init__.py", "copies": "2", "size": "3140", "license": "mit", "hash": 4955351682058425000, "line_mean": 29.4854368932, "line_max": 80, "alpha_frac": 0.6200636943, "autogenerated": false, "ratio": 3.102766798418972, "config_test": false, "has_no_ke...
"""Bayesian Gaussian Mixture Model.""" # Author: Wei Xue <xuewei4d@gmail.com> # Thierry Guillemot <thierry.guillemot.work@gmail.com> # License: BSD 3 clause import math import numpy as np from scipy.special import betaln, digamma, gammaln from .base import BaseMixture, _check_shape from .gaussian_mixture impo...
{ "repo_name": "Vimos/scikit-learn", "path": "sklearn/mixture/bayesian_mixture.py", "copies": "17", "size": "32965", "license": "bsd-3-clause", "hash": 7128310793812631000, "line_mean": 41.0471938776, "line_max": 96, "alpha_frac": 0.6006977097, "autogenerated": false, "ratio": 4.126815222834251, ...
"""Bayesian Gaussian Mixture Models and Dirichlet Process Gaussian Mixture Models""" from __future__ import print_function # Author: Alexandre Passos (alexandre.tp@gmail.com) # Bertrand Thirion <bertrand.thirion@inria.fr> # # Based on mixture.py by: # Ron Weiss <ronweiss@gmail.com> # Fabian Ped...
{ "repo_name": "ldirer/scikit-learn", "path": "sklearn/mixture/dpgmm.py", "copies": "5", "size": "35898", "license": "bsd-3-clause", "hash": -6269736621584645000, "line_mean": 40.214695752, "line_max": 79, "alpha_frac": 0.5665218118, "autogenerated": false, "ratio": 3.8059796437659035, "config_t...
"""Bayesian Gaussian Mixture Models and Dirichlet Process Gaussian Mixture Models""" # Author: Alexandre Passos (alexandre.tp@gmail.com) # Bertrand Thirion <bertrand.thirion@inria.fr> # # Based on mixture.py by: # Ron Weiss <ronweiss@gmail.com> # Fabian Pedregosa <fabian.pedregosa@inria.fr> # ...
{ "repo_name": "cdegroc/scikit-learn", "path": "sklearn/mixture/dpgmm.py", "copies": "1", "size": "29986", "license": "bsd-3-clause", "hash": 8603487796028585000, "line_mean": 40.1895604396, "line_max": 79, "alpha_frac": 0.5522910692, "autogenerated": false, "ratio": 3.7775258251448727, "config_...
"""Bayesian Generalized Linear Model implementation. Implementation of Bayesian GLMs using a mixture of Gaussians posterior approximation with the reparameterization trick and variational inference. See [1]_ for the posterior mixture idea, and [2]_ for the inference scheme. .. [1] Gershman, S., Hoffman, M., & Blei, D...
{ "repo_name": "NICTA/revrand", "path": "revrand/glm.py", "copies": "1", "size": "25530", "license": "apache-2.0", "hash": 3314980036645843500, "line_mean": 34.856741573, "line_max": 79, "alpha_frac": 0.5724245985, "autogenerated": false, "ratio": 3.906058751529988, "config_test": false, "has_...
#Bayesian inference for simple linear regression with known noise variance #The goal is to reproduce fig 3.7 from Bishop's book. #We fit the linear model f(x,w) = w0 + w1*x and plot the posterior over w. import numpy as np import matplotlib.pyplot as plt import os import pyprobml_utils as pml from scipy.stats ...
{ "repo_name": "probml/pyprobml", "path": "scripts/linreg_2d_bayes_demo.py", "copies": "1", "size": "5078", "license": "mit", "hash": -2555941149178532400, "line_mean": 31.3439490446, "line_max": 110, "alpha_frac": 0.6707365104, "autogenerated": false, "ratio": 3.0461907618476305, "config_test":...
""" Bayesian Linear Sampler Module. """ import logging import numpy as np import scipy import scipy.stats as stats import scipy.linalg as linalg from dora.active_sampling.base_sampler import Sampler, random_sample log = logging.getLogger(__name__) class BayesianLinear(Sampler): """Bayesian linear model. Att...
{ "repo_name": "NICTA/dora", "path": "dora/active_sampling/lin_sampler.py", "copies": "1", "size": "13768", "license": "apache-2.0", "hash": -6466430420537272000, "line_mean": 33.0792079208, "line_max": 164, "alpha_frac": 0.5350087159, "autogenerated": false, "ratio": 3.9303454182129602, "config...
# Bayesian model selection demo for polynomial regression # This illustartes that if we have more data, Bayes picks a more complex model. # Based on a demo by Zoubin Ghahramani import numpy as np import matplotlib.pyplot as plt import os figdir = "../figures" def save_fig(fname): plt.savefig(os.path.join(figdir, fnam...
{ "repo_name": "probml/pyprobml", "path": "scripts/linreg_eb_modelsel_vs_n.py", "copies": "1", "size": "5689", "license": "mit", "hash": -2551013912274423300, "line_mean": 35.7032258065, "line_max": 112, "alpha_frac": 0.607488135, "autogenerated": false, "ratio": 3.0036958817317845, "config_test...
"""bayesian_network.py The purpose of this model is to assist with the construction of Bayesian Networks designed for modeling the effects of a molecular mechanism. The goal is to learn about this molecular mechanism by analysing the evidence that we have. We can then perform a genome wide association compariang genot...
{ "repo_name": "christopher-gillies/MultiplePhenotypeAssociationBayesianNetwork", "path": "mpabn/bayesian_network.py", "copies": "1", "size": "25945", "license": "mit", "hash": -3128055910550962700, "line_mean": 26.5435244161, "line_max": 234, "alpha_frac": 0.6843322413, "autogenerated": false, "r...
"""Bayesian optimization according to: Brochu, Cora, and de Freitas' tutorial at http://haikufactory.com/files/bayopt.pdf Adopted from http://atpassos.me/post/44900091837/bayesian-optimization """ # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Alexandre Passos <alexandre.tp@gmail....
{ "repo_name": "autoreject/autoreject", "path": "autoreject/bayesopt.py", "copies": "1", "size": "2413", "license": "bsd-3-clause", "hash": 1472723007953599200, "line_mean": 29.5443037975, "line_max": 77, "alpha_frac": 0.6042271032, "autogenerated": false, "ratio": 3.1583769633507854, "config_te...
# Bayesian optimization of 1d continuous function # Modified from Martin Krasser's code # https://github.com/krasserm/bayesian-machine-learning/blob/dev/bayesian-optimization/bayesian_optimization.ipynb import numpy as np from bayes_opt_utils import BayesianOptimizer, MultiRestartGradientOptimizer, expected_improveme...
{ "repo_name": "probml/pyprobml", "path": "scripts/bayes_opt_demo.py", "copies": "1", "size": "7296", "license": "mit", "hash": 5936896831980325000, "line_mean": 32.3150684932, "line_max": 114, "alpha_frac": 0.6215734649, "autogenerated": false, "ratio": 3.0412671946644436, "config_test": false,...
# Bayesian optimization of 1d regression # Modified from Martin Krasser's code # https://github.com/krasserm/bayesian-machine-learning/blob/dev/bayesian-optimization/bayesian_optimization.ipynb import numpy as np import matplotlib.pyplot as plt import os figdir = os.path.join(os.environ["PYPROBML"], "figures") def sav...
{ "repo_name": "probml/pyprobml", "path": "scripts/bayes_opt_demo_orig.py", "copies": "1", "size": "8767", "license": "mit", "hash": 852865262957034100, "line_mean": 30.3071428571, "line_max": 114, "alpha_frac": 0.6124800365, "autogenerated": false, "ratio": 3.1726384364820848, "config_test": fa...
"""Bayesian regression for latent source model and Bitcoin. This module implements the 'Bayesian regression for latent source model' method for predicting price variation of Bitcoin. You can read more about the method at https://arxiv.org/pdf/1410.1231.pdf. """ import numpy as np import bigfloat as bg from numpy.linal...
{ "repo_name": "stavros0/bitcoin-price-prediction", "path": "bitcoin_price_prediction/bayesian_regression.py", "copies": "1", "size": "7065", "license": "mit", "hash": -225282618824388130, "line_mean": 35.5440414508, "line_max": 88, "alpha_frac": 0.6225719552, "autogenerated": false, "ratio": 3.59...
"""Bayesian variant calling with FreeBayes. https://github.com/ekg/freebayes """ import os import sys from bcbio import bam, utils from bcbio.distributed.transaction import file_transaction from bcbio.pipeline import config_utils from bcbio.pipeline.shared import subset_variant_regions from bcbio.provenance import d...
{ "repo_name": "elkingtonmcb/bcbio-nextgen", "path": "bcbio/variation/freebayes.py", "copies": "1", "size": "14735", "license": "mit", "hash": 6933827038082164000, "line_mean": 45.4826498423, "line_max": 111, "alpha_frac": 0.6038683407, "autogenerated": false, "ratio": 3.525963149078727, "config...
"""Bayesian variant calling with FreeBayes. https://github.com/ekg/freebayes """ import os import sys import six import toolz as tz from bcbio import utils from bcbio.distributed.transaction import file_transaction from bcbio.heterogeneity import chromhacks from bcbio.pipeline import config_utils, shared from bcbio...
{ "repo_name": "vladsaveliev/bcbio-nextgen", "path": "bcbio/variation/freebayes.py", "copies": "4", "size": "17947", "license": "mit", "hash": -8737912516893681000, "line_mean": 47.2446236559, "line_max": 117, "alpha_frac": 0.5905722405, "autogenerated": false, "ratio": 3.599478539911753, "confi...
"""Bayesian variant calling with FreeBayes. https://github.com/ekg/freebayes """ import os import sys import toolz as tz from bcbio import utils from bcbio.distributed.transaction import file_transaction from bcbio.pipeline import config_utils, shared from bcbio.pipeline import datadict as dd from bcbio.provenance ...
{ "repo_name": "Cyberbio-Lab/bcbio-nextgen", "path": "bcbio/variation/freebayes.py", "copies": "1", "size": "15685", "license": "mit", "hash": 3740411158960791000, "line_mean": 46.1021021021, "line_max": 111, "alpha_frac": 0.5965572203, "autogenerated": false, "ratio": 3.5761513907888736, "confi...
from copy import deepcopy, copy import networkx as nx from PyBayes.ProbabilityTable import * from warnings import warn class BayesNet(object): """ Bayes Net Implementation Usage: - - - - """ def __init__(self, edges, variables, domains, probability...
{ "repo_name": "nathanpucheril/PyBayes", "path": "PyBayes/BayesNet.py", "copies": "1", "size": "4864", "license": "apache-2.0", "hash": 5605643184949526000, "line_mean": 30.1794871795, "line_max": 131, "alpha_frac": 0.5565378289, "autogenerated": false, "ratio": 3.960912052117264, "config_test":...
# bayesNet.py # ----------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to http://ai.berkeley.edu. # ...
{ "repo_name": "omardroubi/Artificial-Intelligence", "path": "Projects/Project4/bayesNets/bayesNet.py", "copies": "1", "size": "40209", "license": "apache-2.0", "hash": -960898408539462400, "line_mean": 46.2491186839, "line_max": 179, "alpha_frac": 0.6384640255, "autogenerated": false, "ratio": 4....
# bayesNets2TestClasses.py # ------------------------ # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to ...
{ "repo_name": "omardroubi/Artificial-Intelligence", "path": "Projects/Project4/bayesNets/bayesNets2TestClasses.py", "copies": "1", "size": "25415", "license": "apache-2.0", "hash": 7159118383958792000, "line_mean": 45.0416666667, "line_max": 190, "alpha_frac": 0.6622467047, "autogenerated": false, ...
# Bayes' Theorem # P(A|B) = P(B|A) P(A) / P(B) # A = "like" # B = has key value B # P(A) = |liked| / |url| # P(B) = |key| / |url| # P(B|A) = |liked from B| / |liked| # P(A|B) = ((|liked from B| / |liked|) (|liked| / |url|)) / (|key| / |url|) # = (|liked from B| / |url|) / (|key| / |url|) = |liked from B| / |key|...
{ "repo_name": "TobyRoseman/PS4M", "path": "engine/analyzers/bayesScorer.py", "copies": "1", "size": "3041", "license": "mit", "hash": -100596529431874050, "line_mean": 30.6770833333, "line_max": 96, "alpha_frac": 0.5501479776, "autogenerated": false, "ratio": 3.378888888888889, "config_test": f...
"""Bazaar-related utilities.""" from __future__ import absolute_import import csv import re from builtins import bytes, str # pylint: disable=redefined-builtin from six import StringIO from readthedocs.projects.exceptions import ProjectImportError from readthedocs.vcs_support.base import BaseVCS, VCSVersion clas...
{ "repo_name": "pombredanne/readthedocs.org", "path": "readthedocs/vcs_support/backends/bzr.py", "copies": "1", "size": "2972", "license": "mit", "hash": 7877630058621822000, "line_mean": 28.4257425743, "line_max": 78, "alpha_frac": 0.5195154778, "autogenerated": false, "ratio": 3.9679572763684914...
"""bazango URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-ba...
{ "repo_name": "rafal-jaworski/bazaNGObackend", "path": "src/bazango/urls.py", "copies": "1", "size": "1543", "license": "bsd-3-clause", "hash": 4003575314507430400, "line_mean": 35.7380952381, "line_max": 120, "alpha_frac": 0.7154893065, "autogenerated": false, "ratio": 3.772616136919315, "conf...
# bazel build polygerrit-ui/app:gr-app # mitmdump -s "serve-app-locally.py ~/gerrit/bazel-bin/polygerrit-ui/app" from mitmproxy import http import argparse import os import zipfile class Server: def __init__(self, bundle): self.bundle = bundle self.bundlemtime = 0 self.files = { ...
{ "repo_name": "qtproject/qtqa-gerrit", "path": "contrib/mitm-ui/serve-app-locally.py", "copies": "1", "size": "1490", "license": "apache-2.0", "hash": 4459688000218201000, "line_mean": 31.3913043478, "line_max": 73, "alpha_frac": 0.5912751678, "autogenerated": false, "ratio": 3.6077481840193704, ...
################################################# # User configurable data section # ################################################# # Put your Application ID and Secret here APPID = '5KzQuKHIkxxxxxxxxxxxxxxxxxxSztLwiAF7' SECRET = '0e68e582xxxxxxxxxxxxxxxxxxxx0f25f4' #################################...
{ "repo_name": "pombreda/django-hotclub", "path": "libs/external_libs/ybrowserauth/bbatestMAIL.py", "copies": "5", "size": "3094", "license": "mit", "hash": 3840916157860875000, "line_mean": 40.2133333333, "line_max": 181, "alpha_frac": 0.5646412411, "autogenerated": false, "ratio": 3.415011037527...
# BBB pinout # http://insigntech.files.wordpress.com/2013/09/bbb_pinouts.jpg # matrix test from shifter import Shifter import time bitMap = ["00111111110000000111100111100000","00000110000000001111111111110000","00000110000000000111111111100000","00000110000000000011111111000000","00000110000000000001111110000000","0$...
{ "repo_name": "danasf/pyshift", "path": "hs.py", "copies": "1", "size": "1111", "license": "mit", "hash": -2610692506729973000, "line_mean": 40.1851851852, "line_max": 188, "alpha_frac": 0.5103510351, "autogenerated": false, "ratio": 3.4827586206896552, "config_test": false, "has_no_keywords"...
# BBB pinout # http://insigntech.files.wordpress.com/2013/09/bbb_pinouts.jpg # space invader test from shifter import Shifter import time frame1 = ["00001100000000000000000000000000","00011110000000000000000000000000","00111111000000000000000000000000","01101101100000000000000000000000","01111111100000000000000000000...
{ "repo_name": "danasf/pyshift", "path": "invader.py", "copies": "1", "size": "1426", "license": "mit", "hash": 7413355258089985000, "line_mean": 39.7428571429, "line_max": 290, "alpha_frac": 0.6297335203, "autogenerated": false, "ratio": 4.109510086455331, "config_test": false, "has_no_keywor...
# BBB pinout # http://insigntech.files.wordpress.com/2013/09/bbb_pinouts.jpg # test from shifter import Shifter import time # DATA (R1), DATA2 (R2), CLOCK, LATCH, SelA, SelB, SelC,OE s = Shifter("P8_7","P8_13","P8_9","P8_11","P8_8","P8_10","P8_12","P8_14") while True: count = 0 while count < 16: ...
{ "repo_name": "danasf/pyshift", "path": "leds.py", "copies": "1", "size": "1052", "license": "mit", "hash": 6899837230859295000, "line_mean": 28.2222222222, "line_max": 73, "alpha_frac": 0.3935361217, "autogenerated": false, "ratio": 3.717314487632509, "config_test": false, "has_no_keywords":...
# BBB_QC_Motor_Calibration.py # # Created by Peter Olejnik # # Created on: 16/01/2016 # Last concious update on: 17/01/2016 # # Purpose - This data collection program is an outright replacement for # the Quanser unit used up to this point. What this does is it # collectes reading from two ADCS, each hooked up...
{ "repo_name": "ValRose/BBB_Quadcopter", "path": "Flight_Program/Motor_Calibration.py", "copies": "1", "size": "4767", "license": "mit", "hash": 8180100545567713000, "line_mean": 23.6994818653, "line_max": 73, "alpha_frac": 0.6813509545, "autogenerated": false, "ratio": 2.554662379421222, "confi...
# BBB_QC_Motor_Calibration.py # # Created by Peter Olejnik # # Created on: 16/01/2016 # Last concious update on: 17/01/2016 # # Purpose - This program collects the data on a load cell calibration # run. # # Inputs - Program wise none. # # Outputs - The ADC readout and pwm # # ############### Imports ####...
{ "repo_name": "ValRose/BBB_Quadcopter", "path": "Data_Measurement/Load_Cell_Calibration.py", "copies": "2", "size": "2734", "license": "mit", "hash": -6834773921423108000, "line_mean": 21.4098360656, "line_max": 72, "alpha_frac": 0.6686174104, "autogenerated": false, "ratio": 2.6187739463601534, ...
import RPi.GPIO as GPIO import time import os import random buttonPin = 16 music = None ledPin = 3 GPIO.setmode(GPIO.BOARD) GPIO.setup(12, GPIO.OUT) GPIO.setup(buttonPin, GPIO.IN) GPIO.setup(ledPin, GPIO.OUT) p = GPIO.PWM(12, 50) p.start(10.5) bb8_sounds = ['mpg321 /home/pi/Desktop/bb8/bb8_sounds/bb8_1.mp3', 'mpg...
{ "repo_name": "estefanniegg/estefannieExplainsItAll", "path": "makes/bbCake/bb8cake.py", "copies": "1", "size": "1294", "license": "mit", "hash": -4286148329605209600, "line_mean": 20.9322033898, "line_max": 117, "alpha_frac": 0.700927357, "autogenerated": false, "ratio": 2.5776892430278884, "c...
"""BBF usage guidelines plugin See BBF Assigned Names and Numbers at https://wiki.broadband-forum.org/display/BBF/Assigned+Names+and+Numbers#AssignedNamesandNumbers-URNNamespaces """ import optparse from pyang import plugin from pyang.plugins import lint def pyang_plugin_init(): plugin.register_plugin(BBFPlugin(...
{ "repo_name": "mbj4668/pyang", "path": "pyang/plugins/bbf.py", "copies": "1", "size": "1116", "license": "isc", "hash": 4344616297095013400, "line_mean": 30.8857142857, "line_max": 147, "alpha_frac": 0.5681003584, "autogenerated": false, "ratio": 3.943462897526502, "config_test": false, "has_...
# *- bbgdatapuller.py *- import os import numpy as np import pandas as pd import blpapi class BBGCaller(object): ''' Base class serving as glue to different classes interacting with the BBG terminal, but it has no further utility ''' def __init__(self, **kwargs): ''' Parameters ...
{ "repo_name": "tagomatech/ETL", "path": "bbg/bbgdatapuller.py", "copies": "1", "size": "3838", "license": "mit", "hash": 7077557818234696000, "line_mean": 28.984375, "line_max": 116, "alpha_frac": 0.5284002084, "autogenerated": false, "ratio": 4.297872340425532, "config_test": false, "has_no_...
"""bbgo URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based...
{ "repo_name": "genonfire/bbgo", "path": "bbgo/urls.py", "copies": "1", "size": "2253", "license": "mit", "hash": -1764625336273409300, "line_mean": 45.9375, "line_max": 85, "alpha_frac": 0.6706613404, "autogenerated": false, "ratio": 3.5093457943925235, "config_test": false, "has_no_keywords"...
# bbigpicture crawls a subreddit and pulls out images/videos with large file sizes import praw from operator import itemgetter from sys import stdout try: from urllib.request import urlopen except: from urllib2 import urlopen subredditToProcess = 'funny' submissionsToCheck = 100 topImageCount = 5 def getURL...
{ "repo_name": "spgar/bigpicture", "path": "bigpicture.py", "copies": "1", "size": "2549", "license": "mit", "hash": -3922372990365256000, "line_mean": 27.6516853933, "line_max": 84, "alpha_frac": 0.6539819537, "autogenerated": false, "ratio": 3.5304709141274238, "config_test": false, "has_no_...
__author__ = 'Brady Hunsaker, Osman Ozaltin, Ted Ralphs, Aykut Bulut' __maintainer__ = 'Aykut Bulut (aykut@lehigh.edu)' """ This package is for visualizing branch-and-bound. It also contains a basic branch-and-bound implementation primarily for classroom and educational use. Communication with solvers is through a g...
{ "repo_name": "tkralphs/GrUMPy", "path": "src/grumpy/BBTree.py", "copies": "1", "size": "97583", "license": "epl-1.0", "hash": -8279668600723684000, "line_mean": 45.8698366955, "line_max": 148, "alpha_frac": 0.552411793, "autogenerated": false, "ratio": 4.095651808948208, "config_test": false, ...
# bbref.py import datetime import logging import re from string import ascii_lowercase from bs4 import BeautifulSoup from dateutil.parser import * from nba.scraper import BasketballScraper from nba.dates import datetostr from nba.names import fuzzy_match from nba.pipelines.bbref import * from nba.player.nbacom impor...
{ "repo_name": "sansbacon/nba", "path": "bbref.py", "copies": "1", "size": "15408", "license": "mit", "hash": -6796014073940704000, "line_mean": 38.9170984456, "line_max": 117, "alpha_frac": 0.5242082035, "autogenerated": false, "ratio": 4.002077922077922, "config_test": false, "has_no_keyword...
"""bbreminder URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
{ "repo_name": "samupl/bbreminder", "path": "bbreminder/urls.py", "copies": "1", "size": "1062", "license": "mit", "hash": 7471257009328178000, "line_mean": 41.48, "line_max": 86, "alpha_frac": 0.6883239171, "autogenerated": false, "ratio": 3.448051948051948, "config_test": false, "has_no_keyw...
"""bbsauth -- verifies session token <http://www.ietf.org/rfc/rfc4616.txt> Copyright (c) 2009, Coptix, Inc. All rights reserved. See the LICENSE file for license terms and warranty disclaimer. """ from __future__ import absolute_import from sasl import mechanism as mech, auth __all__ = ('BBSAuth') class BBSAuth(me...
{ "repo_name": "HenryHu/pybbs", "path": "bbsauth.py", "copies": "1", "size": "1665", "license": "bsd-2-clause", "hash": 1514998511847794200, "line_mean": 25.015625, "line_max": 70, "alpha_frac": 0.5915915916, "autogenerated": false, "ratio": 3.899297423887588, "config_test": false, "has_no_key...
bc = 5 mc = 5 pc = 5 while 1: money = input("돈을 입력하세요: ") if money == "admin": while 1: print("블랙커피:%s, 밀크커피:%s, 고급커피:%s" % (bc, mc, pc)) recharge = input("추가할 커피를 선택하시오-1:블랙커피,2:밀크커피,3:고급커피,4:exit: ") if int(recharge) == 1: plus_bc = int(input("추가할 블랙...
{ "repo_name": "imn00133/pythonSeminar17", "path": "exercise/vending_machine/Jungu/09_10_coffee.py", "copies": "1", "size": "2163", "license": "mit", "hash": -8728807512034161000, "line_mean": 31.0555555556, "line_max": 75, "alpha_frac": 0.4240323512, "autogenerated": false, "ratio": 1.78453608247...
"""bcbio init""" import os import copy import yaml from itertools import izip from scilifelab.utils.dry import dry_rsync from scilifelab.utils.misc import opt_to_dict from scilifelab.log import minimal_logger from bcbio.pipeline.run_info import _unique_flowcell_info LOG = minimal_logger(__name__) POST_PROCESS_OPTS =...
{ "repo_name": "jun-wan/scilifelab", "path": "scilifelab/bcbio/__init__.py", "copies": "4", "size": "7062", "license": "mit", "hash": 1018628515879511800, "line_mean": 40.5411764706, "line_max": 161, "alpha_frac": 0.5872274143, "autogenerated": false, "ratio": 3.6685714285714286, "config_test": ...
"""bcbio qc module. Parsers for collecting qc metrics.""" import os import re import yaml import glob import xml.parsers.expat from uuid import uuid4 import json import numpy as np import csv import collections import xml.etree.cElementTree as ET from bs4 import BeautifulSoup import datetime from scilifelab.log import...
{ "repo_name": "jun-wan/scilifelab", "path": "scilifelab/bcbio/qc/__init__.py", "copies": "4", "size": "41191", "license": "mit", "hash": 8712598117762880000, "line_mean": 40.6070707071, "line_max": 288, "alpha_frac": 0.5534704183, "autogenerated": false, "ratio": 3.8388630009319664, "config_tes...
"""bcbio run module""" import os import re import yaml import glob from itertools import chain import pandas as pd import datetime from scilifelab.utils.misc import filtered_walk, query_yes_no, prune_option_list from scilifelab.utils.dry import dry_write, dry_backup, dry_unlink, dry_rmdir, dry_makedir from scilifelab....
{ "repo_name": "jun-wan/scilifelab", "path": "scilifelab/bcbio/run.py", "copies": "4", "size": "17863", "license": "mit", "hash": -6198398954029245000, "line_mean": 45.8845144357, "line_max": 250, "alpha_frac": 0.6122711751, "autogenerated": false, "ratio": 3.4504539308479814, "config_test": tru...
import numpy as np import tensorflow as tf from GPflow.tf_wraps import eye from GPflow.model import GPModel from GPflow._settings import settings from GPflow.mean_functions import Zero from GPflow.param import Param, DataHolder from GPflow.densities import multivariate_normal from GPflow import kernels, transforms, li...
{ "repo_name": "ShibataLabPrivate/GPyWorkshop", "path": "Experiments/bcgplvm.py", "copies": "1", "size": "5962", "license": "mit", "hash": 8472915980121355000, "line_mean": 38.2236842105, "line_max": 104, "alpha_frac": 0.6252935257, "autogenerated": false, "ratio": 3.4402769763416043, "config_te...
# BCImage # Get 2D list of pixels, indexed by [row][col]. # Each element is a list [red, green, blue] # (So, it's really 3D ...) # Return the red, green, blue values of the pixel at location (x,y) of the photo. def _get_pixel(photo, x, y): p = photo.get(x, y) vals = p.split(" ") r = int(vals[0]) ...
{ "repo_name": "rootulp/school", "path": "cs101/HW8/BCImage.py", "copies": "1", "size": "1130", "license": "mit", "hash": -3672807867271397400, "line_mean": 30.2857142857, "line_max": 101, "alpha_frac": 0.5672566372, "autogenerated": false, "ratio": 3.021390374331551, "config_test": false, "ha...
# BCOnvert.py v0.1 by Yoshi2 import time import argparse import os import subprocess from re import match from struct import pack, unpack from math import floor, ceil import math def read_vertex(v_data): split = v_data.split("/") #if len(split) == 3: # vnormal = int(split[2]) #else: # vnorm...
{ "repo_name": "RenolY2/mkdd-collision", "path": "BCOnvert.py", "copies": "1", "size": "28319", "license": "mit", "hash": -2315562074346569700, "line_mean": 34.0482673267, "line_max": 139, "alpha_frac": 0.5138599527, "autogenerated": false, "ratio": 3.3032777324157236, "config_test": false, "h...
"""bCourses configuration Revision ID: 50937c69da0b Revises: 0c98b865104f Create Date: 2016-11-14 20:16:39.879837 """ # revision identifiers, used by Alembic. revision = '50937c69da0b' down_revision = '0c98b865104f' from alembic import op import sqlalchemy as sa import server def upgrade(): ### commands auto ...
{ "repo_name": "Cal-CS-61A-Staff/ok", "path": "migrations/versions/50937c69da0b_bcourses_configuration.py", "copies": "1", "size": "2624", "license": "apache-2.0", "hash": -4489860545951288300, "line_mean": 47.5925925926, "line_max": 138, "alpha_frac": 0.6962652439, "autogenerated": false, "ratio"...
"""BCP module.""" import asyncio from functools import partial from typing import List from mpf.core.events import QueuedEvent from mpf.core.mpf_controller import MpfController from mpf.core.bcp.bcp_server import BcpServer from mpf.core.utility_functions import Util from mpf.core.bcp.bcp_interface import BcpInterfac...
{ "repo_name": "missionpinball/mpf", "path": "mpf/core/bcp/bcp.py", "copies": "1", "size": "4677", "license": "mit", "hash": -9000619983028722000, "line_mean": 38.3025210084, "line_max": 106, "alpha_frac": 0.601881548, "autogenerated": false, "ratio": 4.172167707404103, "config_test": true, "h...
"""Bcp server for clients which connect and disconnect randomly.""" from mpf.exceptions.runtime_error import MpfRuntimeError from mpf.core.utility_functions import Util from mpf.core.mpf_controller import MpfController class BcpServer(MpfController): """Server socket which listens for incoming BCP clients.""" ...
{ "repo_name": "missionpinball/mpf", "path": "mpf/core/bcp/bcp_server.py", "copies": "1", "size": "1673", "license": "mit", "hash": -1865973294700756700, "line_mean": 36.1777777778, "line_max": 119, "alpha_frac": 0.6120741184, "autogenerated": false, "ratio": 4.172069825436409, "config_test": fa...
"""BCP Server interface for the MPF Media Controller""" # bcp_server.py # Mission Pinball Framework # Written by Brian Madden & Gabe Knuth # Released under the MIT License. (See license info at the end of this file.) # The Backbox Control Protocol was conceived and developed by: # Quinn Capen # Kevin Kelm # Gabe Knuth...
{ "repo_name": "spierepf/mpf", "path": "mpf/media_controller/core/bcp_server.py", "copies": "2", "size": "6587", "license": "mit", "hash": 6301569814928214000, "line_mean": 34.0372340426, "line_max": 84, "alpha_frac": 0.5838773341, "autogenerated": false, "ratio": 4.514736120630569, "config_test...
"""BCP Server interface for the MPF Media Controller""" import logging import queue import socket import sys import threading import time import traceback import select import mpf.core.bcp.bcp_socket_client as bcp from mpf.exceptions.runtime_error import MpfRuntimeError class BCPServer(threading.Thread): """Pa...
{ "repo_name": "missionpinball/mpf-mc", "path": "mpfmc/core/bcp_server.py", "copies": "2", "size": "9878", "license": "mit", "hash": -8285285205772493000, "line_mean": 38.0434782609, "line_max": 114, "alpha_frac": 0.5060741041, "autogenerated": false, "ratio": 4.953861584754263, "config_test": f...
"""BCP Server interface for the MPF Media Controller""" import logging import queue import socket import threading import os import select from datetime import datetime import math import mpf.core.bcp.bcp_socket_client as bcp from PyQt5.QtCore import QTimer class BCPClient(object): def __init__(self, mpfmon,...
{ "repo_name": "missionpinball/mpf-monitor", "path": "mpfmonitor/core/bcp_client.py", "copies": "1", "size": "8878", "license": "mit", "hash": -6553435907485042000, "line_mean": 32.7566539924, "line_max": 158, "alpha_frac": 0.5544041451, "autogenerated": false, "ratio": 4.229633158646974, "confi...
"""BCP socket client.""" import json from urllib.parse import urlsplit, parse_qs, quote, unquote, urlunparse import asyncio from typing import Tuple from mpf._version import __version__, __bcp_version__ from mpf.core.bcp.bcp_client import BaseBcpClient class MpfJSONEncoder(json.JSONEncoder): """Encoder which ...
{ "repo_name": "missionpinball/mpf", "path": "mpf/core/bcp/bcp_socket_client.py", "copies": "1", "size": "10954", "license": "mit", "hash": 2759327995862957000, "line_mean": 30.0311614731, "line_max": 119, "alpha_frac": 0.5624429432, "autogenerated": false, "ratio": 4.158694001518603, "config_te...
"""bcrypt and hmac implementation for Django.""" import base64 import hashlib import logging import bcrypt import hmac from django.conf import settings from django.contrib.auth.models import get_hexdigest from django.utils.encoding import smart_str log = logging.getLogger('django_sha2') def create_hash(userpwd): ...
{ "repo_name": "fwenzel/django-sha2", "path": "django_sha2/bcrypt_auth.py", "copies": "1", "size": "3139", "license": "bsd-3-clause", "hash": -3546868525839659500, "line_mean": 33.1195652174, "line_max": 88, "alpha_frac": 0.6396941701, "autogenerated": false, "ratio": 3.5670454545454544, "config...
"""bcrypt and hmac implementation for Django.""" import base64 import hashlib import bcrypt import hmac from django.conf import settings def create_hash(userpwd): """Given a password, create a key to be stored in the DB.""" if not settings.HMAC_KEYS: raise ImportError('settings.HMAC_KEYS must not be...
{ "repo_name": "brianloveswords/django-sha2", "path": "django_sha2/bcrypt_auth.py", "copies": "1", "size": "1794", "license": "bsd-3-clause", "hash": 9055262426584656000, "line_mean": 31.6181818182, "line_max": 76, "alpha_frac": 0.6599777035, "autogenerated": false, "ratio": 3.4302103250478013, ...
# BCrypt was developed to replace md5_crypt for BSD systems. # It uses a modified version of the Blowfish stream cipher. # Featuring a large salt and variable number of rounds, # it's currently the default password hash for many systems # (notably BSD), and has no known weaknesses. # See: http://pythonhosted.org/passli...
{ "repo_name": "RichardKnop/django-oauth2-server", "path": "oauth2server/apps/credentials/models.py", "copies": "1", "size": "3525", "license": "mpl-2.0", "hash": 4428923000508719000, "line_mean": 30.203539823, "line_max": 79, "alpha_frac": 0.6314893617, "autogenerated": false, "ratio": 4.02397260...
## bctg.py ## by andrew wayne teesdale jr. class LL: def __init__(self, ll, name): import random self.randnum=random.choice(['True', 'False']) self.msg=random.choice(['I dont know.', 'Oh, Yes '+ll, 'I think '+name+' knows.']) def say_to(self, msg): ## msging system print ...
{ "repo_name": "ActiveState/code", "path": "recipes/Python/578623_adventure_game_base/recipe-578623.py", "copies": "1", "size": "4302", "license": "mit", "hash": -4176467536647650000, "line_mean": 28.6689655172, "line_max": 96, "alpha_frac": 0.5172013017, "autogenerated": false, "ratio": 3.4554216...
"""BD2013 dataset loader to be used with DeepMHC.""" from __future__ import division from __future__ import print_function __author__ = "Vignesh Ram Somnath" __license__ = "MIT" import numpy as np import os import logging import deepchem as dc DATASET_URL = "http://tools.iedb.org/static/main/binding_data_2013.zip"...
{ "repo_name": "peastman/deepchem", "path": "contrib/DeepMHC/bd13_datasets.py", "copies": "5", "size": "5208", "license": "mit", "hash": 5854156926600183000, "line_mean": 33.72, "line_max": 95, "alpha_frac": 0.6380568356, "autogenerated": false, "ratio": 3.0798344175044354, "config_test": true, ...
"""bdalg.py This file contains some standard block diagram algebra. Routines in this module: append series parallel negate feedback connect """ """Copyright (c) 2010 by California Institute of Technology All rights reserved. Redistribution and use in source and binary forms, with or without modification, are perm...
{ "repo_name": "murrayrm/python-control", "path": "control/bdalg.py", "copies": "2", "size": "12183", "license": "bsd-3-clause", "hash": -4822685365977349000, "line_mean": 31.4015957447, "line_max": 80, "alpha_frac": 0.641631782, "autogenerated": false, "ratio": 3.9073123797305964, "config_test"...
# bdateutil # ----------- # Adds business day logic and improved data type flexibility to # python-dateutil. 100% backwards compatible with python-dateutil, # simply replace dateutil imports with bdateutil. # # Author: ryanss <ryanssdev@icloud.com> # Website: https://github.com/ryanss/bdateutil # License: MIT ...
{ "repo_name": "pganssle/bdateutil", "path": "bdateutil/relativedelta.py", "copies": "1", "size": "10420", "license": "mit", "hash": 7595475299879946000, "line_mean": 42.5983263598, "line_max": 78, "alpha_frac": 0.4717850288, "autogenerated": false, "ratio": 4.203307785397338, "config_test": fal...
"""bdist_mpkg.cmd_bdist_mpkg Implements the Distutils 'bdist_mpkg' command (create an OS X "mpkg" binary distribution).""" import os import sys import zipfile from setuptools import Command from distutils.util import get_platform, byte_compile from distutils.dir_util import remove_tree, mkpath from distutils.errors...
{ "repo_name": "bitcraft/pyglet", "path": "tools/genmpkg/bdist_mpkg_pyglet/cmd_bdist_mpkg.py", "copies": "1", "size": "17741", "license": "bsd-3-clause", "hash": -7712228298910726000, "line_mean": 34.7681451613, "line_max": 86, "alpha_frac": 0.5702046108, "autogenerated": false, "ratio": 4.0671710...
"""bdist_nsi.bdist_nsi Implements the Distutils 'bdist_nsi' command: create a Windows NSIS installer. """ # Created 2005/05/24, j-cg , inspired by the bdist_wininst of the python # distribution # June/July 2009 (Amorilia): # - further developed, 2to3, blender, maya # December 2009/January 2010 (Amorilia): # - a...
{ "repo_name": "amorilia/bdist_nsi", "path": "bdist_nsi/bdist_nsi.py", "copies": "1", "size": "69126", "license": "bsd-3-clause", "hash": 8809018936613052000, "line_mean": 35.9262820513, "line_max": 381, "alpha_frac": 0.585293522, "autogenerated": false, "ratio": 3.439446711115534, "config_test"...
bdLibPath=os.path.abspath(sys.argv[0]+"..") if not bdLibPath in sys.path: sys.path.append(bdLibPath) from _lib import * import unittest class SmokeTests(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def test_001_GoogleSearch(self): LaunchB...
{ "repo_name": "YoTsenkov/TelerikSoftwareAcademyHomeworks", "path": "QA/Sikuli/sikuli_tests/smoke_tests.sikuli/smoke_tests.py", "copies": "1", "size": "3679", "license": "mit", "hash": -6714345372082455000, "line_mean": 32.4454545455, "line_max": 109, "alpha_frac": 0.6841533025, "autogenerated": fal...
"""bdo_tools URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-b...
{ "repo_name": "zsommers/bdo_chronicle", "path": "bdo_tools/bdo_tools/urls.py", "copies": "1", "size": "1728", "license": "mit", "hash": -561749877013865600, "line_mean": 40.1428571429, "line_max": 85, "alpha_frac": 0.6996527778, "autogenerated": false, "ratio": 3.4979757085020244, "config_test"...
# Be able to call directly such as `python test_annotators.py` try: from .context import loctext except SystemError: # Parent module '' not loaded, cannot perform relative import pass from loctext.util import PRO_ID, LOC_ID, ORG_ID, REL_PRO_LOC_ID, UNIPROT_NORM_ID, GO_NORM_ID, TAXONOMY_NORM_ID from nalaf.lear...
{ "repo_name": "Rostlab/LocText", "path": "tests/test_corpus_stats.py", "copies": "2", "size": "4461", "license": "apache-2.0", "hash": -7051875492359709000, "line_mean": 41.8942307692, "line_max": 266, "alpha_frac": 0.6494059628, "autogenerated": false, "ratio": 2.8596153846153847, "config_test...
# Be able to call directly such as `python test_annotators.py` try: from .context import loctext except SystemError: # Parent module '' not loaded, cannot perform relative import pass from pytest import raises from loctext.util import PRO_ID, LOC_ID, REL_PRO_LOC_ID, repo_path, UNIPROT_NORM_ID, GO_NORM_ID from...
{ "repo_name": "juanmirocks/LocText", "path": "tests/test_loctext_writing_of_normalizations.py", "copies": "2", "size": "3876", "license": "apache-2.0", "hash": -2464471812397149700, "line_mean": 38.1515151515, "line_max": 161, "alpha_frac": 0.6767285862, "autogenerated": false, "ratio": 3.5494505...
"""Be able to merge a CSV file that IDOT provides""" import sys import datetime import pandas as pd from pyiem.util import get_dbconn pgconn = get_dbconn("postgis") cursor = pgconn.cursor() xref = {} cursor.execute("""SELECT idot_id, segid from roads_base""") for row in cursor: xref[row[0]] = row[1] ROADCOND = {...
{ "repo_name": "akrherz/iem", "path": "scripts/roads/idot_csv_ingest.py", "copies": "1", "size": "1493", "license": "mit", "hash": -235465106682183040, "line_mean": 27.7115384615, "line_max": 60, "alpha_frac": 0.6383121232, "autogenerated": false, "ratio": 2.997991967871486, "config_test": false...
"""Beacon advertisement parser.""" from construct import ConstructError from .structs import LTVFrame from .packet_types import EddystoneUIDFrame, EddystoneURLFrame, EddystoneEncryptedTLMFrame, \ EddystoneTLMFrame, EddystoneEIDFrame, IBeaconAdvertisement, \ EstimoteT...
{ "repo_name": "citruz/beacontools", "path": "beacontools/parser.py", "copies": "1", "size": "3670", "license": "mit", "hash": 6683110906443822000, "line_mean": 42.1764705882, "line_max": 99, "alpha_frac": 0.6354223433, "autogenerated": false, "ratio": 3.4952380952380953, "config_test": false, ...
"""beacon Functions for interacting with the remote beacon to retrieve records. rest api root: https://beacon.nist.gov/rest/ rest api example endpoints: https://beacon.nist.gov/rest/record/1395971640 https://beacon.nist.gov/rest/record/previous/1395971640 https://beacon.nist.gov/rest/record/next/139...
{ "repo_name": "codycollier/netropy", "path": "netropy/beacon.py", "copies": "1", "size": "2405", "license": "mit", "hash": 990609983646429000, "line_mean": 26.6436781609, "line_max": 76, "alpha_frac": 0.6869022869, "autogenerated": false, "ratio": 3.500727802037846, "config_test": false, "has...
"""BeagleBone Black specific PWM driver sysfs interface""" import sys import os import glob sys.path.append(os.path.abspath("..")) import pwmpy.pwm as linux_pwm # import pwmpy from https://github.com/scottellis/pwmpy # override __init__ to find_pwm devices on beaglebone black instead of rpi __author__ = 'Coburn Wig...
{ "repo_name": "coburnw/bbb-pwm", "path": "bbb_pwm.py", "copies": "1", "size": "6046", "license": "mit", "hash": -8829086615908924000, "line_mean": 34.3567251462, "line_max": 126, "alpha_frac": 0.5605358915, "autogenerated": false, "ratio": 3.5212580081537563, "config_test": false, "has_no_key...
"""Beaker utilities""" from ._compat import PY2, string_type, unicode_text, NoneType, dictkeyslist, im_class, im_func try: import threading as _threading except ImportError: import dummy_threading as _threading from datetime import datetime, timedelta import os import re import string import types import weak...
{ "repo_name": "jvanasco/beaker", "path": "beaker/util.py", "copies": "3", "size": "15373", "license": "bsd-3-clause", "hash": -5931180874862488000, "line_mean": 32.8612334802, "line_max": 97, "alpha_frac": 0.5802380798, "autogenerated": false, "ratio": 4.060486001056524, "config_test": true, ...
"""Beaker utilities""" from ._compat import PY2, string_type, unicode_text, NoneType, dictkeyslist, im_class, im_func, pickle, func_signature, \ default_im_func try: import threading as _threading except ImportError: import dummy_threading as _threading from datetime import datetime, timedelta import os i...
{ "repo_name": "stefanv/aandete", "path": "app/lib/beaker/util.py", "copies": "2", "size": "16487", "license": "bsd-3-clause", "hash": 4828358153595487000, "line_mean": 33.3479166667, "line_max": 121, "alpha_frac": 0.5941650998, "autogenerated": false, "ratio": 4.0688548864758145, "config_test":...
"""Beaker utilities""" try: import thread as _thread import threading as _threading except ImportError: import dummy_thread as _thread import dummy_threading as _threading from datetime import datetime, timedelta import os import re import string import types import weakref import warnings import sys ...
{ "repo_name": "anedos/beaker", "path": "beaker/util.py", "copies": "1", "size": "12369", "license": "bsd-3-clause", "hash": 7529617728857624000, "line_mean": 31.1272727273, "line_max": 87, "alpha_frac": 0.5778963538, "autogenerated": false, "ratio": 4.107937562271671, "config_test": true, "ha...
"""Beam center finding algorithms""" from typing import Tuple, Dict import numpy as np import scipy.optimize from . import integrate2 class Centering: """Find the beam center on a scattering pattern using various algorithms Beam center coordinates are (row, column), starting from 0. mask: True if pixe...
{ "repo_name": "awacha/sastool", "path": "sastool/utils2d/centering2.py", "copies": "1", "size": "9807", "license": "bsd-3-clause", "hash": 8361848156571785000, "line_mean": 52.8076923077, "line_max": 119, "alpha_frac": 0.6040028592, "autogenerated": false, "ratio": 3.8194227769110762, "config_t...
"""Beam DoFns specific to `code_search.dataflow.transforms.function_embeddings`.""" import apache_beam as beam from code_search.t2t.query import get_encoder, encode_query class EncodeFunctionTokens(beam.DoFn): """Encode function tokens. This DoFn prepares the function tokens for inference by a SavedModel est...
{ "repo_name": "kubeflow/examples", "path": "code_search/src/code_search/dataflow/do_fns/function_embeddings.py", "copies": "1", "size": "4388", "license": "apache-2.0", "hash": 2458677965950059500, "line_mean": 25.5939393939, "line_max": 83, "alpha_frac": 0.5720145852, "autogenerated": false, "ra...
"""Beam DoFns specific to `code_search.dataflow.transforms.github_dataset`.""" import logging import apache_beam as beam from apache_beam import pvalue import code_search.dataflow.utils as utils class SplitRepoPath(beam.DoFn): """Update element keys to separate repo path and file path. This DoFn's only purpose i...
{ "repo_name": "kubeflow/examples", "path": "code_search/src/code_search/dataflow/do_fns/github_dataset.py", "copies": "1", "size": "3387", "license": "apache-2.0", "hash": 1222041487153300500, "line_mean": 25.6692913386, "line_max": 78, "alpha_frac": 0.6247416593, "autogenerated": false, "ratio":...
"""Beamform visibilities to the location of known sources.""" import numpy as np import scipy.interpolate from skyfield.api import Star, Angle from caput import config from caput import time as ctime from cora.util import units from ..core import task, containers, io from ..util._fast_tools import beamform from ..u...
{ "repo_name": "radiocosmology/draco", "path": "draco/analysis/beamform.py", "copies": "1", "size": "46320", "license": "mit", "hash": 6385820505524366000, "line_mean": 36.4757281553, "line_max": 91, "alpha_frac": 0.5558721934, "autogenerated": false, "ratio": 4.0440020953378735, "config_test": ...
# Beam In Vessel Test import sys sys.path.append('../lib/') from BeamDynamicsTools import * import pylab as pl # Input Sigma Matrix S1 = matrix(loadtxt('../data/SigmaInjection.dat')) #S1 = matrix([ #[ 1.502802755999999818e+01,-1.284540872159999791e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.0000000000...
{ "repo_name": "hbar/python-BeamDynamicsTools", "path": "test/Test_TrajectoriesAndDetection.py", "copies": "1", "size": "7006", "license": "mit", "hash": -1824403414029123800, "line_mean": 30.2767857143, "line_max": 225, "alpha_frac": 0.6512988867, "autogenerated": false, "ratio": 2.18323465253973...
# Beam In Vessel Test import sys sys.path.append('../lib/') from BeamDynamicsTools import * import pylab as pl #------------------------------------------------------------------------------ # Input Sigma Matrix S1 = matrix([ [ 1.502802755999999818e+01,-1.284540872159999791e+00, 0.000000000000000000e+00, 0.0000000000...
{ "repo_name": "hbar/python-BeamDynamicsTools", "path": "test/Test_BeamInVessel.py", "copies": "1", "size": "4415", "license": "mit", "hash": 2180595728272910000, "line_mean": 36.1008403361, "line_max": 165, "alpha_frac": 0.562400906, "autogenerated": false, "ratio": 2.819284802043423, "config_t...
"""Beam lifetime calculation.""" import os as _os import importlib as _implib from copy import deepcopy as _dcopy import numpy as _np from mathphys import constants as _cst, units as _u, \ beam_optics as _beam from . import optics as _optics if _implib.util.find_spec('scipy'): import scipy.integrate as _int...
{ "repo_name": "lnls-fac/pyaccel", "path": "pyaccel/lifetime.py", "copies": "1", "size": "21169", "license": "mit", "hash": 3322612445438544000, "line_mean": 30.8195488722, "line_max": 79, "alpha_frac": 0.5572306238, "autogenerated": false, "ratio": 3.2745280099040546, "config_test": false, "h...
"""Beam Optics functions.""" import math as _math import numpy as _np from mathphys import constants as _c from mathphys import units as _u # NOTE: This function is used in siriuspy! def beam_rigidity(**kwargs): """Beam rigidity.""" # TODO: cleanup this function (and siriuspy Normalizer) electron_rest_en...
{ "repo_name": "lnls-fac/mathphys", "path": "mathphys/beam_optics.py", "copies": "1", "size": "2384", "license": "mit", "hash": -7282463313370352000, "line_mean": 33.5507246377, "line_max": 72, "alpha_frac": 0.5927013423, "autogenerated": false, "ratio": 3.343618513323983, "config_test": false, ...
# Beam.py from numpy import * #import scipy as sp import pylab as pl from numpy.linalg import inv,norm from Trajectory import * from Target import * from Ellipse import * class Beam(Trajectory): # inputs: # sigma = 6x6 sigma matrix # s0 = 3x3 matrix for local beam coordinate system def __init__(self,trajectory,si...
{ "repo_name": "hbar/python-BeamDynamicsTools", "path": "lib/BeamDynamicsTools/Beam.py", "copies": "1", "size": "13482", "license": "mit", "hash": 7512085720315209000, "line_mean": 30.3534883721, "line_max": 163, "alpha_frac": 0.4296840231, "autogenerated": false, "ratio": 2.4274396831112712, "c...
"""Beam search decoder. This module implements the beam search algorithm for autoregressive decoders. As any autoregressive decoder, this decoder works dynamically, which means it uses the ``tf.while_loop`` function conditioned on both maximum output length and list of finished hypotheses. The beam search decoder us...
{ "repo_name": "ufal/neuralmonkey", "path": "neuralmonkey/decoders/beam_search_decoder.py", "copies": "1", "size": "24043", "license": "bsd-3-clause", "hash": 2149791837008164600, "line_mean": 39.3406040268, "line_max": 79, "alpha_frac": 0.6173522439, "autogenerated": false, "ratio": 4.28497594011...
"""Beam search decoder. This module implements the beam search algorithm for the recurrent decoder. As well as the recurrent decoder, this decoder works dynamically, which means it uses the ``tf.while_loop`` function conditioned on both maximum output length and list of finished hypotheses. The beam search decoder w...
{ "repo_name": "bastings/neuralmonkey", "path": "neuralmonkey/decoders/beam_search_decoder.py", "copies": "1", "size": "13626", "license": "bsd-3-clause", "hash": -8393374438059377000, "line_mean": 40.0421686747, "line_max": 79, "alpha_frac": 0.5852781447, "autogenerated": false, "ratio": 4.141641...
# beam search implementation in PyTorch.""" # # # hyp1#-hyp1---hyp1 -hyp1 # \ / # hyp2 \-hyp2 /-hyp2#hyp2 # / \ # hyp3#-hyp3---hyp3 -hyp3 # ======================== # # Takes care of beams, back pointers, and scores. # Code ...
{ "repo_name": "pemami4911/neural-combinatorial-rl-pytorch", "path": "beam_search.py", "copies": "1", "size": "3639", "license": "mit", "hash": 639332694957609600, "line_mean": 29.0743801653, "line_max": 98, "alpha_frac": 0.5674635889, "autogenerated": false, "ratio": 3.488974113135187, "config_...
"""Beam search implementation in PyTorch.""" # # # hyp1#-hyp1---hyp1 -hyp1 # \ / # hyp2 \-hyp2 /-hyp2#hyp2 # / \ # hyp3#-hyp3---hyp3 -hyp3 # ======================== # # Takes care of beams, back pointers, and scores. # Code...
{ "repo_name": "yotamfr/prot2vec", "path": "src/python/beam_search.py", "copies": "1", "size": "3546", "license": "mit", "hash": -515618012324584800, "line_mean": 28.7983193277, "line_max": 78, "alpha_frac": 0.5578116187, "autogenerated": false, "ratio": 3.4527750730282376, "config_test": false,...
"""Beam search parameters tuning for DeepSpeech2 model.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys import os import numpy as np import argparse import functools import gzip import logging import paddle.v2 as paddle import _init_paths from ...
{ "repo_name": "xinghai-sun/models", "path": "deep_speech_2/tools/tune.py", "copies": "1", "size": "9262", "license": "apache-2.0", "hash": -767477818495310500, "line_mean": 40.1644444444, "line_max": 80, "alpha_frac": 0.6036493198, "autogenerated": false, "ratio": 3.416451493913685, "config_tes...