text stringlengths 0 1.05M | meta dict |
|---|---|
# Boa:Dialog:frmFlagValues
import wx
from odmtools.odmdata import Qualifier
def create(parent):
return frmFlagValues(parent)
NEW = "[New Qualifier]"
class frmFlagValues(wx.Dialog):
def _init_coll_boxSizer1_Items(self, parent):
# generated method, don't edit
parent.AddWindow(self.splitter... | {
"repo_name": "ODM2/ODMToolsPython",
"path": "odmtools/gui/frmFlagValues.py",
"copies": "1",
"size": "6665",
"license": "bsd-3-clause",
"hash": 2970989568618972000,
"line_mean": 36.8693181818,
"line_max": 116,
"alpha_frac": 0.5737434359,
"autogenerated": false,
"ratio": 3.552771855010661,
"conf... |
#Boa:Frame:Frame1
import wx
def create(parent):
return Frame1(parent)
[wxID_FRAME1, wxID_FRAME1BUTTON1, wxID_FRAME1BUTTON2, wxID_FRAME1PANEL1,
wxID_FRAME1PANEL2, wxID_FRAME1PANEL4, wxID_FRAME1PANEL6,
wxID_FRAME1STATICTEXT1, wxID_FRAME1STATICTEXT10, wxID_FRAME1STATICTEXT11,
wxID_FRAME1STATICTEXT12, wxID_FRA... | {
"repo_name": "sebid/se-irq-dev",
"path": "alx/interface.py",
"copies": "1",
"size": "11168",
"license": "mit",
"hash": -8203703917834120000,
"line_mean": 46.5234042553,
"line_max": 80,
"alpha_frac": 0.6323424069,
"autogenerated": false,
"ratio": 3.0257382823083177,
"config_test": false,
"has... |
"""
Copyright (c) 2013 David Webster
See license.txt
"""
# The code to get the list of window properties and
# the isRealWindow() function are taken from here:
# http://stackoverflow.com/questions/151846/get-other-running-processes-window-sizes-in-python
import wx
import os
import win32con
import win32gu... | {
"repo_name": "pyfan1/TopWindows",
"path": "FrameMain.py",
"copies": "1",
"size": "7132",
"license": "mit",
"hash": 3363624858221777000,
"line_mean": 36.3440860215,
"line_max": 94,
"alpha_frac": 0.6217049916,
"autogenerated": false,
"ratio": 3.515032035485461,
"config_test": false,
"has_no_ke... |
#Boa:Frame:frmChangeValue
import wx
from wx.lib.pubsub import pub as Publisher
def create(parent):
return frmChangeValue(parent)
[wxID_FRMCHANGEVALUE, wxID_FRMCHANGEVALUEBTNAPPLY,
wxID_FRMCHANGEVALUEBTNCANCEL, wxID_FRMCHANGEVALUECBVALUE,
wxID_FRMCHANGEVALUEPANEL1, wxID_FRMCHANGEVALUETXTVALUE,
] = [wx.NewId(... | {
"repo_name": "ODM2/ODMToolsPython",
"path": "odmtools/gui/frmChangeValue.py",
"copies": "1",
"size": "3703",
"license": "bsd-3-clause",
"hash": 7098782746954847000,
"line_mean": 37.9789473684,
"line_max": 116,
"alpha_frac": 0.6251687821,
"autogenerated": false,
"ratio": 3.103939647946354,
"con... |
#Boa:Frame:frmQueryBuilder
import wx
import wx.richtext
def create(parent):
return frmQueryBuilder(parent)
[wxID_FRMQUERYBUILDER, wxID_FRMQUERYBUILDERBTNALL, wxID_FRMQUERYBUILDERBTNAND,
wxID_FRMQUERYBUILDERBTNAPPLY, wxID_FRMQUERYBUILDERBTNCANCEL,
wxID_FRMQUERYBUILDERBTNCLEAR, wxID_FRMQUERYBUILDERBTNEQUAL,
... | {
"repo_name": "ODM2/ODMToolsPython",
"path": "odmtools/gui/frmQueryBuilder.py",
"copies": "1",
"size": "12315",
"license": "bsd-3-clause",
"hash": 6988090615808610000,
"line_mean": 42.9821428571,
"line_max": 80,
"alpha_frac": 0.643361754,
"autogenerated": false,
"ratio": 3.0657206870799105,
"co... |
# Boa:FramePanel:plotSummary
import wx
import wx.grid
from wx.lib.wordwrap import wordwrap
import os
#import pandas as pd
[wxID_PLOTSUMMARY, wxID_PLOTSUMMARYGRDSUMMARY,
] = [wx.NewId() for _init_ctrls in range(2)]
import logging
# from odmtools.common.logger import LoggerTool
#
# tool = LoggerTool()
# logger = tool.... | {
"repo_name": "ODM2/ODMToolsPython",
"path": "odmtools/gui/plotSummary.py",
"copies": "1",
"size": "7172",
"license": "bsd-3-clause",
"hash": -8374730594621087000,
"line_mean": 39.5254237288,
"line_max": 119,
"alpha_frac": 0.6242331288,
"autogenerated": false,
"ratio": 3.431578947368421,
"confi... |
#Boa:FramePanel:pnlMethods
import wx
import wx.grid
import wx.richtext
from odmtools.odmdata import Method
[wxID_PNLMETHOD, wxID_PNLMETHODSLISTCTRL1, wxID_PNLMETHODSRBCREATENEW,
wxID_PNLMETHODSRBGENERATE, wxID_PNLMETHODSRBSELECT,
wxID_PNLMETHODSRICHTEXTCTRL1,
] = [wx.NewId() for _init_ctrls in range(6)]
# from odm... | {
"repo_name": "ODM2/ODMToolsPython",
"path": "odmtools/gui/pageMethod.py",
"copies": "1",
"size": "5002",
"license": "bsd-3-clause",
"hash": -996422034886091100,
"line_mean": 37.4846153846,
"line_max": 89,
"alpha_frac": 0.6533386645,
"autogenerated": false,
"ratio": 3.37744767049291,
"config_te... |
#Boa:FramePanel:pnlQCL
import wx
from odmtools.odmdata import QualityControlLevel
[wxID_PNLQCL, wxID_PNLQCLLBLCODE, wxID_PNLQCLLBLDEFINITION,
wxID_PNLQCLLBLEXPLANATION, wxID_PNLQCLLSTQCL, wxID_PNLQCLRBCREATE,
wxID_PNLQCLRBSELECT, wxID_PNLQCLTXTCODE, wxID_PNLQCLTXTDEFINITION,
wxID_PNLQCLTXTEXPLANATION,
] = [wx.NewI... | {
"repo_name": "ODM2/ODMToolsPython",
"path": "odmtools/gui/pageQCL.py",
"copies": "1",
"size": "5261",
"license": "bsd-3-clause",
"hash": 7813997498386067000,
"line_mean": 38.5563909774,
"line_max": 76,
"alpha_frac": 0.628587721,
"autogenerated": false,
"ratio": 3.0551684088269453,
"config_test... |
#Boa:FramePanel:pnlVariable
import wx
from odmtools.controller.frmCreateVariable import frmCreateVariable
from odmtools.odmdata import Variable
[wxID_PNLVARIABLE, wxID_PNLVARIABLELSTVARIABLE, wxID_PNLVARIABLERBCREATE,
wxID_PNLVARIABLERBCURRENT, wxID_PNLVARIABLERBSELECT,wxID_PNLVARIABLETXTNEWVAR,
] = [wx.NewId() for ... | {
"repo_name": "ODM2/ODMToolsPython",
"path": "odmtools/gui/pageVariable.py",
"copies": "1",
"size": "7051",
"license": "bsd-3-clause",
"hash": -5103522593998008000,
"line_mean": 39.5229885057,
"line_max": 79,
"alpha_frac": 0.6509714934,
"autogenerated": false,
"ratio": 3.2508068234209313,
"conf... |
#Boa:Frame:TFrame
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# Python Adventure Writing System #
# wxPython Terminal Support Code #
# Written by Roger Plowman (c)... | {
"repo_name": "parsiya/malwareadventure",
"path": "PAWS/TerminalFrame.py",
"copies": "1",
"size": "36012",
"license": "mit",
"hash": 4739251355135476000,
"line_mean": 35.318134715,
"line_max": 98,
"alpha_frac": 0.5425691436,
"autogenerated": false,
"ratio": 4.296349319971367,
"config_test": fal... |
#Boa:PyImgResource:
#----------------------------------------------------------------------
# This file was generated by famfamfam_flags.py
#
"""
See: http://www.famfamfam.com/lab/icons/flags
FamFamFam Flag icons are available free for any purpose
Copyright Mark James (mjames@gmail.com)
This module is ... | {
"repo_name": "ktan2020/legacy-automation",
"path": "win/Lib/site-packages/wx-3.0-msw/wx/lib/art/flagart.py",
"copies": "1",
"size": "94458",
"license": "mit",
"hash": 7539669057037669000,
"line_mean": 57.6702463677,
"line_max": 79,
"alpha_frac": 0.8467149421,
"autogenerated": false,
"ratio": 1.5... |
board = [[0 for x in xrange(6)] for x in xrange(7)]
player = 1
win = 0
def user():
exit = 0
ok = [1,2,3,4,5,6,7]
while exit == 0:
user = int(raw_input("Player " +str(player)+ ", Which column would you like to place your piece?"))
if user in ok:
exit = 1
else:
print "Invalid Input!"
return user
def putt... | {
"repo_name": "ninjaminion/FourPy",
"path": "connect4.py",
"copies": "1",
"size": "2166",
"license": "mit",
"hash": -3678520834145059300,
"line_mean": 51.8536585366,
"line_max": 209,
"alpha_frac": 0.5050784857,
"autogenerated": false,
"ratio": 2.7313997477931906,
"config_test": false,
"has_no... |
import os
# Environment Settings
# This file contains critical environment-only variables in order to run the application
# env_settings.py should never be part of GIT, yet any changes (adding new sections) should be replicated and noted here
# Change History
# 1.0 - initial build (env type, hosts, database, AWS & e... | {
"repo_name": "civiclee/Hack4Cause2017",
"path": "src/askeugene/decision_engine/env_settings.py",
"copies": "2",
"size": "1870",
"license": "mit",
"hash": -5194908743667656000,
"line_mean": 31.8070175439,
"line_max": 120,
"alpha_frac": 0.6657754011,
"autogenerated": false,
"ratio": 3.280701754385... |
# BOARD CONSTANTS
WIDTH = 3
PADDING = WIDTH - 1
PADDED_WIDTH = WIDTH + 2 * PADDING
COL_MAP = {'A': 0, 'B': 1, 'C': 2}
class Board:
def __init__(self):
# 3x3 grid w/ 2 cells of padding each side
# padding prevents the has_win routine from having to check for out
# of bounds pieces
s... | {
"repo_name": "rmotr-group-assignments/pyp-c1-a3-b4-g3-t1",
"path": "board.py",
"copies": "1",
"size": "2997",
"license": "mit",
"hash": -4365412803333276000,
"line_mean": 30.21875,
"line_max": 79,
"alpha_frac": 0.5048381715,
"autogenerated": false,
"ratio": 3.779319041614124,
"config_test": fa... |
board = [[['divide',1],['wall',2]],[['turn',2],['turn',3]]]; # board[x][y][property] when property = 0, value = instruction; when property = 1, value = parametre
size = [len(board),len(board[0])]; # size of x and y in the board
memory = {}; # memory implemented as a dict to allow infinite disjo... | {
"repo_name": "darkfuji/Toy-language",
"path": "quickImplementation.py",
"copies": "1",
"size": "7805",
"license": "mit",
"hash": 7050063674045410000,
"line_mean": 29.373540856,
"line_max": 169,
"alpha_frac": 0.6532991672,
"autogenerated": false,
"ratio": 2.9553199545626656,
"config_test": fals... |
"""Boardgame class"""
class BoardGame(object):
"""Object containing information about a boardgame"""
def __init__(self, data):
self._data = data
def __repr__(self):
return("Boardgame(" + self.name + ")")
def data(self):
"""Internal data dictionary"""
retur... | {
"repo_name": "opelr/boardgames",
"path": "boardgames/boardgame.py",
"copies": "1",
"size": "10861",
"license": "bsd-2-clause",
"hash": 8310411553928783000,
"line_mean": 33.4793650794,
"line_max": 117,
"alpha_frac": 0.5515145935,
"autogenerated": false,
"ratio": 4.048080506895267,
"config_test"... |
# Board.py
# Defines a Board, an object that chess is played on
# Created on: 12/23/2015
# Created by: Andrew Davis
# Open source (MIT license)
from Piece import *
#class definition
class Board(object):
"""A gameboard on which to play chess"""
state = [] #boardstate for the game
null_piece_white = 'O' #em... | {
"repo_name": "techgineer/python-chess",
"path": "src/Board.py",
"copies": "1",
"size": "4115",
"license": "mit",
"hash": -8142369736649423000,
"line_mean": 47.4117647059,
"line_max": 110,
"alpha_frac": 0.6140947752,
"autogenerated": false,
"ratio": 3.2710651828298887,
"config_test": false,
"... |
# board.py
# initializes the Connect Four board
# J. Hassler Thurston
# Connect Four
# December 30, 2013
# from win import *
from pattern import *
from sequence import *
from compute_moves import *
class Board:
def __init__(self, columns, rows):
if(columns < 4 or rows < 4):
print("Too few rows or columns.")
... | {
"repo_name": "jthurst3/connectfour",
"path": "board.py",
"copies": "1",
"size": "12927",
"license": "mit",
"hash": 4173321899183213600,
"line_mean": 39.2710280374,
"line_max": 127,
"alpha_frac": 0.7116887135,
"autogenerated": false,
"ratio": 3.356790444040509,
"config_test": false,
"has_no_k... |
"""Boards and wiring strategy for FAST Pinball."""
from typing import List, Dict, Optional, TypeVar, Any, Callable, Tuple
from mpf.core.machine import MachineController
from mpf.wire.base import Board, Pin, System, PinSpecs, SerialLED, Switch, Coil
class FastPFB(Board):
"""The FAST Power Filter Board."""
de... | {
"repo_name": "missionpinball/mpf",
"path": "mpf/wire/fast.py",
"copies": "1",
"size": "20558",
"license": "mit",
"hash": -6413948275966622000,
"line_mean": 37.2118959108,
"line_max": 115,
"alpha_frac": 0.5703862243,
"autogenerated": false,
"ratio": 3.538991220519883,
"config_test": false,
"h... |
BOARD_SIZE = 3
MIN_WORD_LENGTH = 3
test_board_size4 = [('b', 'a', 'r', 'i'),
('e', 'c', 'n', 'u'),
('l', 'a', 'o', 'm'),
('i', 'v', 'p', 's')]
test_board_size3 = [('c', 'a', 't'),
('o', 'p', 'c'),
('r', 'e', 'h')]
de... | {
"repo_name": "alexakarpov/boggler",
"path": "boggler.py",
"copies": "1",
"size": "8535",
"license": "mit",
"hash": -7976059053491338000,
"line_mean": 33.0039840637,
"line_max": 123,
"alpha_frac": 0.6048037493,
"autogenerated": false,
"ratio": 3.348371910553158,
"config_test": true,
"has_no_k... |
"""boards URL Configuration"""
from django.conf.urls import url
from . import views
urlpatterns = [
url(
r'^(?P<table>\d+)/$',
views.show_list,
name='show_list_0'
),
url(
r'^(?P<table>\d+)/(?P<page>\d+)/$',
views.show_list,
name='show_list'
),
url(
... | {
"repo_name": "genonfire/bbgo",
"path": "boards/urls.py",
"copies": "1",
"size": "2626",
"license": "mit",
"hash": -2898358547525104600,
"line_mean": 24.0095238095,
"line_max": 96,
"alpha_frac": 0.4840060929,
"autogenerated": false,
"ratio": 3.405966277561608,
"config_test": false,
"has_no_ke... |
board_width = 5
board_height = 5
n = board_width * board_height
# Set up the matrix of button pushes
A = [[0]*n for i in xrange(n)]
for i in xrange(board_width):
for j in xrange(board_height):
idx = i + j * board_width
A[idx][idx] = 1
if i > 0: A[idx - 1][idx] = 1
if i < board_width -... | {
"repo_name": "brandonpelfrey/lights-out-solver",
"path": "lights-out.py",
"copies": "1",
"size": "1222",
"license": "mit",
"hash": -3801043249862465500,
"line_mean": 31.1578947368,
"line_max": 73,
"alpha_frac": 0.5842880524,
"autogenerated": false,
"ratio": 2.7899543378995433,
"config_test": f... |
"""boat URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/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": "mtzirkel/leakyskiff",
"path": "boat/urls.py",
"copies": "1",
"size": "2069",
"license": "mit",
"hash": -4654726094004760000,
"line_mean": 50.725,
"line_max": 138,
"alpha_frac": 0.6935717738,
"autogenerated": false,
"ratio": 3.222741433021807,
"config_test": false,
"has_no_keywo... |
# Boa:Wizard:wizSave
import wx
import wx.wizard as wiz
# import * from WizardPanels
from odmtools.controller import pageIntro, pageExisting, pageSource
import pageMethod
import pageQCL
import pageVariable
import pageSummary
[wxID_PNLINTRO, wxID_PNLVARIABLE, wxID_PNLMETHOD, wxID_PNLQCL,
wxID_PNLSUMMARY, wxID_WIZSAV... | {
"repo_name": "ODM2/ODMToolsPython",
"path": "odmtools/gui/wizSave.py",
"copies": "1",
"size": "19949",
"license": "bsd-3-clause",
"hash": 1743665252041385000,
"line_mean": 44.3386363636,
"line_max": 138,
"alpha_frac": 0.5955185724,
"autogenerated": false,
"ratio": 3.685387031221134,
"config_te... |
# === BoB ===
import time
import sys
from noob import *
whiteLed = Led().initialize({
'name': "WhiteLed",
'digitalPort': 2,
'pinMode': "OUTPUT"
})
blueLed = Led().initialize({
'name': "WhiteLed",
'digitalPort': 3,
'pinMode': "OUTPUT"
})
redLed = Led().initialize({
'name': "WhiteLed",
'digitalPort': 4... | {
"repo_name": "bots-squad/hey.bob",
"path": "01-RPI-setup/01-src-python/bob.py",
"copies": "1",
"size": "1312",
"license": "mit",
"hash": -4190481036084581000,
"line_mean": 21.2372881356,
"line_max": 96,
"alpha_frac": 0.6631097561,
"autogenerated": false,
"ratio": 2.8521739130434782,
"config_te... |
"""bockus 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-base... | {
"repo_name": "phildini/bockus",
"path": "bockus/urls.py",
"copies": "1",
"size": "1767",
"license": "mit",
"hash": -639975144284582000,
"line_mean": 34.34,
"line_max": 80,
"alpha_frac": 0.6700622524,
"autogenerated": false,
"ratio": 3.4310679611650485,
"config_test": false,
"has_no_keywords"... |
"""Bodies of the Solar System.
Contains some predefined bodies of the Solar System:
* Sun (☉)
* Earth (♁)
* Moon (☾)
* Mercury (☿)
* Venus (♀)
* Mars (♂)
* Jupiter (♃)
* Saturn (♄)
* Uranus (⛢)
* Neptune (♆)
* Pluto (♇)
and a way to define new bodies (:py:class:`~Body` class).
Data references can be found in :py:mo... | {
"repo_name": "poliastro/poliastro",
"path": "src/poliastro/bodies.py",
"copies": "1",
"size": "7003",
"license": "mit",
"hash": -1718339989850037200,
"line_mean": 22.6644067797,
"line_max": 95,
"alpha_frac": 0.5984815929,
"autogenerated": false,
"ratio": 3.0985352862849536,
"config_test": fals... |
# Body: A celestial body located within the game.
# DO NOT MODIFY THIS FILE
# Never try to directly create an instance of this class, or modify its member variables.
# Instead, you should only be reading its variables and calling its functions.
from games.stardash.game_object import GameObject
# <<-- Creer-Merge: im... | {
"repo_name": "JacobFischer/Joueur.py",
"path": "games/stardash/body.py",
"copies": "1",
"size": "3763",
"license": "mit",
"hash": -5128749074989793000,
"line_mean": 29.104,
"line_max": 135,
"alpha_frac": 0.5947382408,
"autogenerated": false,
"ratio": 4.020299145299146,
"config_test": false,
... |
'''Body Composition is a Slicer module that allows to segment different parts of the lungs in a manual or semi-automatic basis
with the help of a customized Slicer Editor.
It also performs a set of operations to analyze the different structures of
the volume based on its label map, like Area, Mean, Std.Dev., etc.
First... | {
"repo_name": "acil-bwh/SlicerCIP",
"path": "Scripted/CIP_BodyComposition/CIP_BodyComposition.py",
"copies": "1",
"size": "83135",
"license": "bsd-3-clause",
"hash": -7128828640876948000,
"line_mean": 48.1051388069,
"line_max": 195,
"alpha_frac": 0.6273410718,
"autogenerated": false,
"ratio": 4.3... |
"""Body readers are classes that implements the asynchronous iterator
interface, and are useful for reading data from a stream without worrying
about the encoding or blocking operations.
:BufferedBodyReader:
Its main purpose is to reduce the blocking overhead caused by an
unique ``read`` call that read many by... | {
"repo_name": "NoZip/centimani",
"path": "centimani/streamutils.py",
"copies": "1",
"size": "4982",
"license": "bsd-3-clause",
"hash": 7864427403810154000,
"line_mean": 28.134502924,
"line_max": 73,
"alpha_frac": 0.5955439582,
"autogenerated": false,
"ratio": 4.404951370468612,
"config_test": f... |
body = str("""
<div class="pagebodydiv">
<!-- ** END OF twbkwbis.P_OpenDoc ** -->
<br>
<div class="infotextdiv"><table class="infotexttable" summary="This layout table contains information that may be helpful in understanding the content and functionality of this page. It could be a brief set of instructions, a desc... | {
"repo_name": "classrank/Grouch",
"path": "grouch/test/PHYS2211.py",
"copies": "1",
"size": "113870",
"license": "mit",
"hash": 8589778576807148000,
"line_mean": 44.8783239323,
"line_max": 638,
"alpha_frac": 0.7061912707,
"autogenerated": false,
"ratio": 2.608108108108108,
"config_test": false,... |
body = str("""
<div class="pagebodydiv">
<!-- ** END OF twbkwbis.P_OpenDoc ** -->
<div class="infotextdiv"><table class="infotexttable" summary="This layout table contains information that may be helpful in understanding the content and functionality of this page. It could be a brief set of instructions, a descripti... | {
"repo_name": "classrank/Grouch",
"path": "grouch/test/catalog.py",
"copies": "1",
"size": "7658",
"license": "mit",
"hash": -3522342763001534000,
"line_mean": 56.5864661654,
"line_max": 672,
"alpha_frac": 0.7486288848,
"autogenerated": false,
"ratio": 3.4050689195197865,
"config_test": false,
... |
body = str("""
<table class="datadisplaytable" summary="This table lists all course detail for the selected term." width="100%">
<tbody><tr>
<td class="nttitle" scope="colgroup"><a href="/pls/bprod/bwckctlg.p_disp_course_detail?cat_term_in=201602&subj_code_in=CS&crse_numb_in=1100">CS 1100 - Freshman Leap Se... | {
"repo_name": "classrank/Grouch",
"path": "grouch/test/courses.py",
"copies": "1",
"size": "199703",
"license": "mit",
"hash": 7593706265020645000,
"line_mean": 34.0542390732,
"line_max": 345,
"alpha_frac": 0.7232039579,
"autogenerated": false,
"ratio": 2.6007058394540814,
"config_test": false,... |
body = str("""
<table class="datadisplaytable" summary="This table lists the course detail for the selected term." width="100%">
<tbody><tr>
<td class="nttitle" scope="colgroup">CS 1332 - Data Struct & Algorithms</td>
</tr>
<tr>
<td class="ntdefault">
Computer data structures... | {
"repo_name": "classrank/Grouch",
"path": "grouch/test/CS1332.py",
"copies": "1",
"size": "1946",
"license": "mit",
"hash": 7582091261365886000,
"line_mean": 46.4634146341,
"line_max": 580,
"alpha_frac": 0.5755395683,
"autogenerated": false,
"ratio": 3.200657894736842,
"config_test": false,
"... |
body = str("""
<table class="dataentrytable" summary="This table is used for input criteria for catalog courses.">
<tbody><tr>
<td class="delabel" scope="row"><label for="subj_id"><span class="fieldlabeltext">Subject: </span></label></td>
<td class="dedefault">
<select name="sel_subj" size="3" multiple="" id="subj_... | {
"repo_name": "classrank/Grouch",
"path": "grouch/test/term.py",
"copies": "1",
"size": "6129",
"license": "mit",
"hash": -5902614083429042000,
"line_mean": 49.6611570248,
"line_max": 299,
"alpha_frac": 0.7307880568,
"autogenerated": false,
"ratio": 3.1318344404701075,
"config_test": false,
"... |
"""BOHB (Bayesian Optimization with HyperBand)"""
import copy
import logging
import math
from typing import Dict, List, Optional, Union
from ray.tune.result import DEFAULT_METRIC
from ray.tune.sample import Categorical, Domain, Float, Integer, LogUniform, \
Normal, \
Quantized, \
Uniform
from ray.tune.sug... | {
"repo_name": "ray-project/ray",
"path": "python/ray/tune/suggest/bohb.py",
"copies": "1",
"size": "12958",
"license": "apache-2.0",
"hash": -522756843460565570,
"line_mean": 38.2666666667,
"line_max": 79,
"alpha_frac": 0.5628955086,
"autogenerated": false,
"ratio": 4.459050240880936,
"config_t... |
"""BOHB (Bayesian Optimization with HyperBand)"""
import copy
import logging
import math
from typing import Dict, Optional, Union
import ConfigSpace
from ray.tune.result import DEFAULT_METRIC
from ray.tune.sample import Categorical, Domain, Float, Integer, LogUniform, \
Normal, \
Quantized, \
Uniform
from... | {
"repo_name": "richardliaw/ray",
"path": "python/ray/tune/suggest/bohb.py",
"copies": "1",
"size": "11421",
"license": "apache-2.0",
"hash": -7619183740593989000,
"line_mean": 37.3255033557,
"line_max": 79,
"alpha_frac": 0.5657998424,
"autogenerated": false,
"ratio": 4.38426103646833,
"config_t... |
#boids.py
"""
Explores flocking behavior of flying "boids" aka "bird android".
Requires Python (www.python.org), my favorite programming language, and
and VPython (www.vpython.org), a fine Python graphics simulation extension for beginners.
Thanks to Conrad Parker conrad@vergenet.net for the boids pseudocode.
... | {
"repo_name": "brupoon/advp",
"path": "boids_from_contrib.py",
"copies": "2",
"size": "10116",
"license": "mit",
"hash": 2015694049266892300,
"line_mean": 47.1067961165,
"line_max": 122,
"alpha_frac": 0.560300514,
"autogenerated": false,
"ratio": 3.2972620599739244,
"config_test": false,
"has... |
# boilerplate code
from __future__ import print_function
import os
from io import BytesIO
import numpy as np
from functools import partial
import PIL.Image
import time
from IPython.display import clear_output, Image, display, HTML
import tensorflow as tf
model_fn = '../tmp/inception5h/tensorflow_inception_graph.pb'
... | {
"repo_name": "TFResources/TFLearning",
"path": "tf_v1.0/test_deepdream.py",
"copies": "1",
"size": "6693",
"license": "apache-2.0",
"hash": -6239324327114037000,
"line_mean": 34.417989418,
"line_max": 106,
"alpha_frac": 0.6314059465,
"autogenerated": false,
"ratio": 3.197802197802198,
"config_... |
# boilerplate code
import numpy as np
from functools import partial
import PIL.Image
import tensorflow as tf
import matplotlib.pyplot as plt
import urllib2
import os
import zipfile
def main():
# download pre-trained model by running the command below in a shell
# wget https://storage.googleapis.com/download.... | {
"repo_name": "lodemo/CATANA",
"path": "src/face_recognition/facenet/tmp/deepdream.py",
"copies": "4",
"size": "10431",
"license": "mit",
"hash": 2519128859694436000,
"line_mean": 38.3622641509,
"line_max": 114,
"alpha_frac": 0.5678266705,
"autogenerated": false,
"ratio": 3.382295719844358,
"co... |
"""Boilerplate functionality for processors."""
import logging
import copy
import petl
import json
import itertools
import collections
import os
import sys
def processor():
return "%-32s" % os.path.basename(sys.argv[0]).split('.')[0].title()
def _override_parameters(pipeline_parameters,
... | {
"repo_name": "Victordeleon/os-data-importers",
"path": "eu-structural-funds/common/row_processor.py",
"copies": "1",
"size": "4666",
"license": "mit",
"hash": -7784719502187280000,
"line_mean": 33.0583941606,
"line_max": 78,
"alpha_frac": 0.6273039006,
"autogenerated": false,
"ratio": 4.69416498... |
"""boilerplate 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')
Clas... | {
"repo_name": "nils-wisiol/django-rest-boilerplate",
"path": "api/boilerplate/urls.py",
"copies": "1",
"size": "1146",
"license": "mit",
"hash": 7135854104614911000,
"line_mean": 35.9677419355,
"line_max": 79,
"alpha_frac": 0.7286212914,
"autogenerated": false,
"ratio": 3.559006211180124,
"conf... |
# Boil.py
# Aaron Taylor
# Moose Abumeeiz
#
# This is the class for the red boil that appears as an enemy
# and shoots in random directions
#
from pygame import *
from func import *
from const import *
from Enemy import *
from Animation import *
from time import time as cTime
from random import choice
from Tear impo... | {
"repo_name": "ExPHAT/binding-of-isaac",
"path": "Boil.py",
"copies": "1",
"size": "2158",
"license": "mit",
"hash": 806965746622882300,
"line_mean": 25,
"line_max": 168,
"alpha_frac": 0.6895273401,
"autogenerated": false,
"ratio": 2.858278145695364,
"config_test": false,
"has_no_keywords": f... |
# Bojan Nikolic <b.nikolic@mrao.cam.ac.uk>)
import numpy
def overlapIndices(a1, a2,
shiftx, shifty):
""" Find the indices where two arrays overlapIndices
:param a1: First array
:param a2: Second array
:param shiftx: Shift in x applied to a1
:param shifty: Shift in y applied to ... | {
"repo_name": "SKA-ScienceDataProcessor/crocodile",
"path": "crocodile/clean.py",
"copies": "1",
"size": "2666",
"license": "apache-2.0",
"hash": -8253282368104539000,
"line_mean": 29.6436781609,
"line_max": 116,
"alpha_frac": 0.5791447862,
"autogenerated": false,
"ratio": 3.1217798594847777,
"... |
# Bojan Nikolic <b.nikolic@mrao.cam.ac.uk>
"""Simulate data observed by an interferometer
USEFUL NOTES
---------------------------------------------------------------------------------
From http://casa.nrao.edu/Memos/CoordConvention.pdf :
UVW is a right-handed coordinate system, with W pointing towards the
source, ... | {
"repo_name": "SKA-ScienceDataProcessor/crocodile",
"path": "crocodile/simulate.py",
"copies": "1",
"size": "11721",
"license": "apache-2.0",
"hash": -5184630061620677000,
"line_mean": 35.400621118,
"line_max": 98,
"alpha_frac": 0.6111253306,
"autogenerated": false,
"ratio": 3.6086822660098523,
... |
# Bojan Nikolic <b.nikolic@mrao.cam.ac.uk>
#
# Synthesise and Image interferometer data
"""Parameter name meanings:
- p: The uvw coordinates [*,3] (m)
- v: The Visibility values [*] (Jy)
- theta: Width of the field of view to be synthetised, as directional
cosines (approximately radians)
- lam: Width of the uv-plane... | {
"repo_name": "SKA-ScienceDataProcessor/crocodile",
"path": "crocodile/synthesis.py",
"copies": "1",
"size": "30180",
"license": "apache-2.0",
"hash": 2720895685339120600,
"line_mean": 31.5566343042,
"line_max": 100,
"alpha_frac": 0.6229290921,
"autogenerated": false,
"ratio": 3.304862023653088,
... |
''' Bokeh Application Handler to look for Bokeh server lifecycle callbacks
in a specified Python module.
'''
from __future__ import absolute_import, print_function
import codecs
import os
from .handler import Handler
from .code_runner import CodeRunner
from bokeh.util.callback_manager import _check_callback
def _d... | {
"repo_name": "DuCorey/bokeh",
"path": "bokeh/application/handlers/server_lifecycle.py",
"copies": "4",
"size": "5245",
"license": "bsd-3-clause",
"hash": 7718616104285798000,
"line_mean": 31.5776397516,
"line_max": 110,
"alpha_frac": 0.6020972355,
"autogenerated": false,
"ratio": 4.3635607321131... |
''' Bokeh comes with a number of interactive tools.
There are five types of tool interactions:
.. hlist::
:columns: 5
* Pan/Drag
* Click/Tap
* Scroll/Pinch
* Actions
* Inspectors
For the first three comprise the category of gesture tools, and only
one tool for each gesture can be active at a... | {
"repo_name": "percyfal/bokeh",
"path": "bokeh/models/tools.py",
"copies": "2",
"size": "29193",
"license": "bsd-3-clause",
"hash": -7994240868372720000,
"line_mean": 32.6324884793,
"line_max": 131,
"alpha_frac": 0.6705374576,
"autogenerated": false,
"ratio": 4.13908974904296,
"config_test": tr... |
""" Bokeh comes with a number of interactive tools.
There are five types of tool interactions:
.. hlist::
:columns: 5
* Pan/Drag
* Click/Tap
* Scroll/Pinch
* Actions
* Inspectors
For the first three comprise the category of gesture tools, and only
one tool for each gesture can be active at a... | {
"repo_name": "ptitjano/bokeh",
"path": "bokeh/models/tools.py",
"copies": "1",
"size": "23812",
"license": "bsd-3-clause",
"hash": 7963421156626984000,
"line_mean": 31.9349930844,
"line_max": 99,
"alpha_frac": 0.6681505123,
"autogenerated": false,
"ratio": 4.147709458282529,
"config_test": fal... |
''' Bokeh comes with a number of interactive tools.
There are five types of tool interactions:
.. hlist::
:columns: 5
* Pan/Drag
* Click/Tap
* Scroll/Pinch
* Actions
* Inspectors
For the first three comprise the category of gesture tools, and only
one tool for each gesture can be active at a... | {
"repo_name": "dennisobrien/bokeh",
"path": "bokeh/models/tools.py",
"copies": "2",
"size": "56007",
"license": "bsd-3-clause",
"hash": 512084672474704500,
"line_mean": 36.1399204244,
"line_max": 124,
"alpha_frac": 0.6719874301,
"autogenerated": false,
"ratio": 4.200945094509451,
"config_test":... |
BOKEH_PALETTE_DATA = {
"bokeh_Category10": {
3: [
"#1f77b4",
"#ff7f0e",
"#2ca02c"
],
4: [
"#1f77b4",
"#ff7f0e",
"#2ca02c",
"#d62728"
],
5: [
"#1f77b4",
"#ff7f0e",
"#2ca02c",
"#d62728",
"#9467bd"
],
6: [
"#1f77b4"... | {
"repo_name": "netbek/chrys",
"path": "chrys/data/bokeh_palettes.py",
"copies": "1",
"size": "92457",
"license": "bsd-3-clause",
"hash": -9109906763402555000,
"line_mean": 15.6379341371,
"line_max": 82,
"alpha_frac": 0.3860280995,
"autogenerated": false,
"ratio": 2.395631445302379,
"config_test... |
## Bokeh server for checkbox button group
from bokeh.io import curdoc
from bokeh.layouts import row
from bokeh.models import CategoricalColorMapper, CheckboxButtonGroup, ColumnDataSource
from bokeh.palettes import RdBu3
from bokeh.plotting import figure
x=[3,4,6,12,10,1]
y=[7,1,3,4,1,6]
z=['red','red','red','blue','b... | {
"repo_name": "bokeh/bokeh",
"path": "examples/reference/models/checkbox_button_server.py",
"copies": "1",
"size": "1529",
"license": "bsd-3-clause",
"hash": -3903680435009552000,
"line_mean": 32.9777777778,
"line_max": 101,
"alpha_frac": 0.7115761936,
"autogenerated": false,
"ratio": 3.288172043... |
## Bokeh server for checkbox button group
from bokeh.io import curdoc
from bokeh.layouts import row
from bokeh.models import ColumnDataSource,CategoricalColorMapper
from bokeh.models.widgets import CheckboxButtonGroup
from bokeh.plotting import figure
from bokeh.palettes import RdBu3
x=[3,4,6,12,10,1]
y=[7,1,3,4,1,6]... | {
"repo_name": "timsnyder/bokeh",
"path": "examples/reference/models/checkbox_button_server.py",
"copies": "1",
"size": "1570",
"license": "bsd-3-clause",
"hash": -9158577008923178000,
"line_mean": 33.1304347826,
"line_max": 101,
"alpha_frac": 0.7159235669,
"autogenerated": false,
"ratio": 3.29831... |
## Bokeh server for checkbox group
from bokeh.io import curdoc
from bokeh.layouts import row
from bokeh.models import CheckboxGroup, ColumnDataSource
from bokeh.plotting import figure
x=[3,4,6,12,10,1]
y=[7,1,3,4,1,6]
source = ColumnDataSource(data=dict(x=x, y=y))
plot_figure = figure(title='Checkbox',height=450, w... | {
"repo_name": "bokeh/bokeh",
"path": "examples/reference/models/checkbox_server.py",
"copies": "1",
"size": "1203",
"license": "bsd-3-clause",
"hash": -5622776807506847000,
"line_mean": 27.6428571429,
"line_max": 74,
"alpha_frac": 0.7032418953,
"autogenerated": false,
"ratio": 3.2779291553133514,... |
## Bokeh server for checkbox group
from bokeh.io import curdoc
from bokeh.layouts import row
from bokeh.models import ColumnDataSource
from bokeh.models.widgets import CheckboxGroup
from bokeh.plotting import figure
x=[3,4,6,12,10,1]
y=[7,1,3,4,1,6]
source = ColumnDataSource(data=dict(x=x, y=y))
plot_figure = figur... | {
"repo_name": "timsnyder/bokeh",
"path": "examples/reference/models/checkbox_server.py",
"copies": "1",
"size": "1245",
"license": "bsd-3-clause",
"hash": 6765912090554738000,
"line_mean": 27.9534883721,
"line_max": 74,
"alpha_frac": 0.7084337349,
"autogenerated": false,
"ratio": 3.29365079365079... |
## Bokeh server for Dropdown
from bokeh.io import curdoc
from bokeh.layouts import row
from bokeh.models import ColumnDataSource, Dropdown
from bokeh.plotting import figure
x=[3,4,6,12,10,1]
y=[7,1,3,4,1,6]
c=['blue','blue','blue','blue','blue','blue']
source = ColumnDataSource(data=dict(x=x, y=y,color=c))
plot_figu... | {
"repo_name": "bokeh/bokeh",
"path": "examples/reference/models/dropdown_menu_server.py",
"copies": "1",
"size": "1078",
"license": "bsd-3-clause",
"hash": 1469143336159406300,
"line_mean": 29.8,
"line_max": 67,
"alpha_frac": 0.6660482375,
"autogenerated": false,
"ratio": 3.019607843137255,
"co... |
## Bokeh server for Dropdown
from bokeh.io import curdoc
from bokeh.layouts import row
from bokeh.models import ColumnDataSource
from bokeh.models.widgets import Dropdown
from bokeh.plotting import figure
x=[3,4,6,12,10,1]
y=[7,1,3,4,1,6]
c=['blue','blue','blue','blue','blue','blue']
source = ColumnDataSource(data=di... | {
"repo_name": "timsnyder/bokeh",
"path": "examples/reference/models/dropdown_menu_server.py",
"copies": "1",
"size": "1120",
"license": "bsd-3-clause",
"hash": -5845825148548031000,
"line_mean": 30.1111111111,
"line_max": 70,
"alpha_frac": 0.6732142857,
"autogenerated": false,
"ratio": 3.04347826... |
## Bokeh server for MultiSelect
import pandas as pd
from bokeh.io import curdoc
from bokeh.layouts import row
from bokeh.models import ColumnDataSource
from bokeh.models.widgets import MultiSelect
from bokeh.plotting import figure
x=[3,4,6,12,10,1]
y=[7,1,3,4,1,6]
label=['Red', 'Orange', 'Red', 'Orange','Red', 'Orange... | {
"repo_name": "timsnyder/bokeh",
"path": "examples/reference/models/multi_select_server.py",
"copies": "1",
"size": "1279",
"license": "bsd-3-clause",
"hash": 7208058080993141000,
"line_mean": 32.6578947368,
"line_max": 101,
"alpha_frac": 0.7028928851,
"autogenerated": false,
"ratio": 3.127139364... |
## Bokeh server for MultiSelect
import pandas as pd
from bokeh.io import curdoc
from bokeh.layouts import row
from bokeh.models import ColumnDataSource, MultiSelect
from bokeh.plotting import figure
x=[3,4,6,12,10,1]
y=[7,1,3,4,1,6]
label=['Red', 'Orange', 'Red', 'Orange','Red', 'Orange']
df=pd.DataFrame({'x':x,'y':... | {
"repo_name": "bokeh/bokeh",
"path": "examples/reference/models/multi_select_server.py",
"copies": "1",
"size": "1237",
"license": "bsd-3-clause",
"hash": 7053713584236388000,
"line_mean": 32.4324324324,
"line_max": 101,
"alpha_frac": 0.6976556184,
"autogenerated": false,
"ratio": 3.1002506265664... |
## Bokeh server for Radio Button Group
import pandas as pd
from bokeh.io import curdoc
from bokeh.layouts import row
from bokeh.models import ColumnDataSource
from bokeh.models.widgets import RadioButtonGroup
from bokeh.plotting import figure
x=[3,4,6,12,10,1,5,6,3,8]
y=[7,1,3,4,1,6,10,4,10,3]
label=['Red', 'Orange', ... | {
"repo_name": "timsnyder/bokeh",
"path": "examples/reference/models/radio_button_group_server.py",
"copies": "1",
"size": "1349",
"license": "bsd-3-clause",
"hash": 7384274779295704000,
"line_mean": 31.9024390244,
"line_max": 89,
"alpha_frac": 0.6990363232,
"autogenerated": false,
"ratio": 2.9845... |
## Bokeh server for Radio Button Group
import pandas as pd
from bokeh.io import curdoc
from bokeh.layouts import row
from bokeh.models import ColumnDataSource, RadioButtonGroup
from bokeh.plotting import figure
x=[3,4,6,12,10,1,5,6,3,8]
y=[7,1,3,4,1,6,10,4,10,3]
label=['Red', 'Orange', 'Red', 'Orange','Red', 'Orange'... | {
"repo_name": "bokeh/bokeh",
"path": "examples/reference/models/radio_button_group_server.py",
"copies": "1",
"size": "1307",
"license": "bsd-3-clause",
"hash": -4190615309788877300,
"line_mean": 31.675,
"line_max": 89,
"alpha_frac": 0.6939556236,
"autogenerated": false,
"ratio": 2.95701357466063... |
## Bokeh server for Radio Group
import pandas as pd
from bokeh.io import curdoc
from bokeh.layouts import row
from bokeh.models import ColumnDataSource
from bokeh.models.widgets import RadioGroup
from bokeh.plotting import figure
x=[3,4,6,12,10,1,5,6,3,8]
y=[7,1,3,4,1,6,10,4,10,3]
label=['Red', 'Orange', 'Red', 'Orang... | {
"repo_name": "timsnyder/bokeh",
"path": "examples/reference/models/radio_group_server.py",
"copies": "1",
"size": "1288",
"license": "bsd-3-clause",
"hash": -7481320074539780000,
"line_mean": 30.4146341463,
"line_max": 89,
"alpha_frac": 0.6902173913,
"autogenerated": false,
"ratio": 2.9339407744... |
## Bokeh server for Radio Group
import pandas as pd
from bokeh.io import curdoc
from bokeh.layouts import row
from bokeh.models import ColumnDataSource, RadioGroup
from bokeh.plotting import figure
x=[3,4,6,12,10,1,5,6,3,8]
y=[7,1,3,4,1,6,10,4,10,3]
label=['Red', 'Orange', 'Red', 'Orange','Red', 'Orange','Red', 'Oran... | {
"repo_name": "bokeh/bokeh",
"path": "examples/reference/models/radio_group_server.py",
"copies": "1",
"size": "1246",
"license": "bsd-3-clause",
"hash": 7274204528216068000,
"line_mean": 30.15,
"line_max": 89,
"alpha_frac": 0.6845906902,
"autogenerated": false,
"ratio": 2.9044289044289044,
"co... |
## Bokeh server for Range Slider
from bokeh.io import curdoc
from bokeh.layouts import row
from bokeh.models import ColumnDataSource
from bokeh.models.widgets import RangeSlider
from bokeh.plotting import figure
from bokeh.sampledata.us_marriages_divorces import data
df=data.copy()
source = ColumnDataSource(data=dic... | {
"repo_name": "timsnyder/bokeh",
"path": "examples/reference/models/range_slider_server.py",
"copies": "1",
"size": "1449",
"license": "bsd-3-clause",
"hash": 2526452842740937000,
"line_mean": 35.225,
"line_max": 146,
"alpha_frac": 0.7522429262,
"autogenerated": false,
"ratio": 3.1295896328293735... |
## Bokeh server for Range Slider
from bokeh.io import curdoc
from bokeh.layouts import row
from bokeh.models import ColumnDataSource, RangeSlider
from bokeh.plotting import figure
from bokeh.sampledata.us_marriages_divorces import data
df=data.copy()
source = ColumnDataSource(data=dict(year=df.Year, population=df.Po... | {
"repo_name": "bokeh/bokeh",
"path": "examples/reference/models/range_slider_server.py",
"copies": "1",
"size": "1406",
"license": "bsd-3-clause",
"hash": 388509299661443900,
"line_mean": 36,
"line_max": 146,
"alpha_frac": 0.7496443812,
"autogenerated": false,
"ratio": 3.1106194690265485,
"conf... |
## Bokeh server for Select
import pandas as pd
from bokeh.io import curdoc
from bokeh.layouts import row
from bokeh.models import ColumnDataSource
from bokeh.models.widgets import Select
from bokeh.plotting import figure
x=[3,4,6,12,10,1,5,6,3,8]
y=[7,1,3,4,1,6,10,4,10,3]
label=['Red', 'Orange', 'Red', 'Orange','Red',... | {
"repo_name": "timsnyder/bokeh",
"path": "examples/reference/models/select_server.py",
"copies": "1",
"size": "1255",
"license": "bsd-3-clause",
"hash": -6936528677188301000,
"line_mean": 29.6097560976,
"line_max": 93,
"alpha_frac": 0.6884462151,
"autogenerated": false,
"ratio": 2.952941176470588... |
## Bokeh server for Select
import pandas as pd
from bokeh.io import curdoc
from bokeh.layouts import row
from bokeh.models import ColumnDataSource, Select
from bokeh.plotting import figure
x=[3,4,6,12,10,1,5,6,3,8]
y=[7,1,3,4,1,6,10,4,10,3]
label=['Red', 'Orange', 'Red', 'Orange','Red', 'Orange','Red', 'Orange','Red'... | {
"repo_name": "bokeh/bokeh",
"path": "examples/reference/models/select_server.py",
"copies": "1",
"size": "1213",
"license": "bsd-3-clause",
"hash": -5801838718146170000,
"line_mean": 29.325,
"line_max": 93,
"alpha_frac": 0.6826051113,
"autogenerated": false,
"ratio": 2.92289156626506,
"config_... |
""" Bokeh theme equivalent to the matplotlib theme
>>> import holoviews as hv
style = get_theme()
hv.renderer('bokeh').theme = style
>>> import bokeh.plotting
style = get_theme('14pt')
bokeh.plotting.curdoc().theme = style
"""
from bokeh.themes import Theme
def _get_font_size(which, normal='12pt'):
... | {
"repo_name": "mfouesneau/ezdata",
"path": "ezdata/bokeh/light_minimal_theme.py",
"copies": "1",
"size": "3552",
"license": "mit",
"hash": 4810321355392150000,
"line_mean": 29.6206896552,
"line_max": 72,
"alpha_frac": 0.5033783784,
"autogenerated": false,
"ratio": 3.5449101796407185,
"config_te... |
""" Bokeh theme equivalent to the matplotlib theme
>>> import plotly.plotly as py
from plotly import tools
import plotly.graph_objs as go
# stack two subplots vertically
fig = tools.get_subplots(rows=2)
fig.append_trace(
Scatter(x=[1,2,3], y=[2,1,2], xaxis='x1', yaxis='y1'), 1, 1)
f... | {
"repo_name": "mfouesneau/ezdata",
"path": "ezdata/plotly/light_minimal_theme.py",
"copies": "1",
"size": "2822",
"license": "mit",
"hash": -2666062207877307000,
"line_mean": 27.7959183673,
"line_max": 72,
"alpha_frac": 0.5120481928,
"autogenerated": false,
"ratio": 3.5994897959183674,
"config_... |
""" BokehWidget
Show Bokeh plots in Flexx. Example:
.. UIExample:: 300
import numpy as np
from bokeh.plotting import figure
from flexx import app, event, ui
x = np.linspace(0, 6, 50)
p1 = figure()
p1.line(x, np.sin(x))
p2 = figure()
p2.line(x, np.cos(x))
class Example(app.PyCo... | {
"repo_name": "jrversteegh/flexx",
"path": "flexx/ui/widgets/_bokeh.py",
"copies": "2",
"size": "4459",
"license": "bsd-2-clause",
"hash": -8535218139029132000,
"line_mean": 30.4014084507,
"line_max": 94,
"alpha_frac": 0.6095537116,
"autogenerated": false,
"ratio": 3.584405144694534,
"config_te... |
""" Bollinger Bands Indicator
"""
import math
import tulipy
import numpy
import pandas
#from talib import abstract
from analyzers.utils import IndicatorUtils
class Bollinger(IndicatorUtils):
def analyze(self, historical_data, period_count=21):
"""Performs a bollinger band analysis on the historical dat... | {
"repo_name": "AbenezerMamo/crypto-signal",
"path": "app/analyzers/informants/bollinger_bands.py",
"copies": "1",
"size": "1667",
"license": "mit",
"hash": 4454036067851018000,
"line_mean": 29.8703703704,
"line_max": 99,
"alpha_frac": 0.6052789442,
"autogenerated": false,
"ratio": 3.8059360730593... |
"""Bollinger Bands."""
import os
import pandas as pd
import matplotlib.pyplot as plt
def symbol_to_path(symbol, base_dir="data"):
"""Return CSV file path given ticker symbol."""
return os.path.join(base_dir, "{}.csv".format(str(symbol)))
def get_data(symbols, dates):
"""Read stock data (adjusted close) ... | {
"repo_name": "bluemurder/mlfl",
"path": "udacity course code/01-04-bollingerbands.py",
"copies": "1",
"size": "2654",
"license": "mit",
"hash": 8665285041766985000,
"line_mean": 30.2235294118,
"line_max": 89,
"alpha_frac": 0.6416729465,
"autogenerated": false,
"ratio": 3.313358302122347,
"conf... |
"""Bollinger Bands."""
import os
import pandas as pd
import matplotlib.pyplot as plt
def symbol_to_path(symbol, base_dir="data"):
"""Return CSV file path given ticker symbol."""
# return os.path.join(base_dir, "{}.csv".format(str(symbol)))
return "{}.csv".format(str(symbol))
def get_data(symbols, dates)... | {
"repo_name": "dmytroKarataiev/MachineLearning",
"path": "capstone/bolinger.py",
"copies": "1",
"size": "2693",
"license": "mit",
"hash": -2605631733572244500,
"line_mean": 30.3255813953,
"line_max": 89,
"alpha_frac": 0.640549573,
"autogenerated": false,
"ratio": 3.3124231242312425,
"config_tes... |
"""Bollinger Bands."""
import os
import pandas as pd
import matplotlib.pyplot as plt
def symbol_to_path(symbol, base_dir="../data"):
"""Return CSV file path given ticker symbol."""
return os.path.join(base_dir, "{}.csv".format(str(symbol)))
def get_data(symbols, dates):
"""Read stock data (adjusted clo... | {
"repo_name": "algoix/blog",
"path": "resource 1/bollingerbands.py",
"copies": "1",
"size": "2766",
"license": "mit",
"hash": 4366648307397965300,
"line_mean": 30.0786516854,
"line_max": 97,
"alpha_frac": 0.6406362979,
"autogenerated": false,
"ratio": 3.3608748481166466,
"config_test": false,
... |
# Bollinger bands simulator
# QSTK Imports
import QSTK.qstkutil.qsdateutil as du
import QSTK.qstkutil.tsutil as tsu
import QSTK.qstkutil.DataAccess as da
# Third Party Imports
import datetime as dt
import numpy as np
import math as math
from bollinger import Bollinger
def get_close_prices (start_date, end_date, sym... | {
"repo_name": "RoyNexus/python",
"path": "homework5.py",
"copies": "1",
"size": "1202",
"license": "unlicense",
"hash": -6883377457190726000,
"line_mean": 28.3170731707,
"line_max": 90,
"alpha_frac": 0.6356073211,
"autogenerated": false,
"ratio": 2.997506234413965,
"config_test": false,
"has_... |
# Boltzmann Machines
Why use a generative model rather than the more well known discriminative deep neural networks (DNN)?
* Discriminitave methods have several limitations: They are mainly supervised learning methods, thus requiring labeled data. And there are tasks they cannot accomplish, like drawing new examples... | {
"repo_name": "CompPhysics/ComputationalPhysics2",
"path": "doc/LectureNotes/_build/jupyter_execute/boltzmannmachines.py",
"copies": "1",
"size": "68848",
"license": "cc0-1.0",
"hash": -8146869299003555000,
"line_mean": 31.2780121894,
"line_max": 709,
"alpha_frac": 0.646917848,
"autogenerated": fal... |
# BOLTZMANN MACHINE THROUGH TIME (name subject to change)
import theano
import theano.tensor as T
Tsigmoid = T.nnet.sigmoid
# Mu.shape = (n_chains, length, dim_h)
# X.shape = (n_chains, length, dim_x)
# W.shape = (dim_t, dim_t+1)
# V.shape = (dim_h, dim_x)
# b.shape = ('x', 'x', dim_h)
# d.shape = ('x', 'x', dim_x)
#... | {
"repo_name": "laurent-dinh/mumbler",
"path": "bmtt.py",
"copies": "1",
"size": "16316",
"license": "bsd-3-clause",
"hash": -8218651096908806000,
"line_mean": 36.508045977,
"line_max": 84,
"alpha_frac": 0.4967516548,
"autogenerated": false,
"ratio": 2.7463390001683217,
"config_test": false,
"... |
import sys, os, re
import numpy as np
import hashlib
import datetime as dt
import copy
try: from collections import OrderedDict
except ImportError:
try: from ordereddict import OrderedDict
except ImportError:
print "Require OrderedDict, https://pypi.python.org/pypi/ordereddict"
raise
import ne... | {
"repo_name": "KimberleyOpie/common-tools",
"path": "raw_data_tools/bomascii_to_csiroflt.py",
"copies": "1",
"size": "10186",
"license": "apache-2.0",
"hash": 2893962723319903700,
"line_mean": 34.9929328622,
"line_max": 102,
"alpha_frac": 0.6292951109,
"autogenerated": false,
"ratio": 3.549128919... |
# Bomb Catcher Game
# Chapter 4
import sys, random, time, pygame
from pygame.locals import *
def print_text(font, x, y, text, color=(255, 255, 255)):
imgText = font.render(text, True, color)
screen.blit(imgText, (x, y))
# main program begins
pygame.init()
screen = pygame.display.set_mode((600... | {
"repo_name": "Great-Li-Xin/PythonDev",
"path": "Games/resources/code/chap04/BombCatcher.py",
"copies": "1",
"size": "2525",
"license": "mit",
"hash": 615784873471345500,
"line_mean": 23.7653061224,
"line_max": 79,
"alpha_frac": 0.5144554455,
"autogenerated": false,
"ratio": 3.117283950617284,
... |
def binarytodecimal( number):
number = str(number)[::-1]
total = 0
for x in xrange(0, len(str(number))):
total = total + int(number[x])*(2**x)
return total
def binarytooctal( number):
number = binarytodecimal( number)
return decimaltooctal( number)
def binarytoohex( number):
number = binarytodecimal( number... | {
"repo_name": "m3pt0r/l0l",
"path": "core/database/convertoffset.py",
"copies": "2",
"size": "2507",
"license": "mit",
"hash": 895626456606687100,
"line_mean": 28.4941176471,
"line_max": 71,
"alpha_frac": 0.6154766653,
"autogenerated": false,
"ratio": 2.8456299659477864,
"config_test": false,
... |
def generator( choose, shellcode, argv="None", argv2="None"):
if choose == "linux_x86":
if shellcode == "bin_sh":
from Linux86.bin_shx86 import bin_shx86
return bin_shx86()
elif shellcode == "exec":
from Linux86.execc import execc
return execc( argv)
elif shellcode == "read":
from Linux86.read... | {
"repo_name": "m3pt0r/l0l",
"path": "core/database/generator.py",
"copies": "2",
"size": "10276",
"license": "mit",
"hash": -3363724911885896700,
"line_mean": 33.2533333333,
"line_max": 201,
"alpha_frac": 0.6325418451,
"autogenerated": false,
"ratio": 3.542226818338504,
"config_test": false,
... |
import sys,re,codecs
def plaintext( string):
string = codecs.encode(str.encode(string), 'hex')
string = string.decode('utf-8')
db = re.findall("..?", string)
return "\\x"+"\\x".join(db)
def plaintextreverse( string):
string = codecs.encode(str.encode(string), 'hex')
string = string.decode('utf-8')
db = re.fin... | {
"repo_name": "roissy/l0l",
"path": "core/database/stackconvert.py",
"copies": "2",
"size": "4480",
"license": "mit",
"hash": -4768887655109040000,
"line_mean": 25.0465116279,
"line_max": 68,
"alpha_frac": 0.578125,
"autogenerated": false,
"ratio": 2.571756601607348,
"config_test": false,
"ha... |
# Bomb.py
# Aaron Taylor
# Moose Abumeeiz
#
# Bombs can be dropped or picked up, they will hurt enemies in range
#
from pygame import *
from time import time as cTime
from random import randint
from math import *
from Explosion import *
from Animation import *
from Item import *
class Bomb(Item):
"""Droppable bomb ... | {
"repo_name": "ExPHAT/binding-of-isaac",
"path": "Bomb.py",
"copies": "1",
"size": "2229",
"license": "mit",
"hash": 7202222567155708000,
"line_mean": 26.1829268293,
"line_max": 165,
"alpha_frac": 0.6751906685,
"autogenerated": false,
"ratio": 2.647268408551069,
"config_test": false,
"has_no_... |
# BOM_SOLAR_ASCII_TO_NETCDF.PY
#
# The input proprietary format supported by this example is a Bureau of
# Meteorology (BoM) ArcView ASCII grid file. The format contains a header
# (defines the shape and size of the grid), space-separated ASCII data, and
# tail metadata that contains internal BoM processing informatio... | {
"repo_name": "KimberleyOpie/common-tools",
"path": "raw_data_tools/bom_solar_ascii_to_netcdf_day_blank.py",
"copies": "1",
"size": "10019",
"license": "apache-2.0",
"hash": 6365892014250625000,
"line_mean": 38.2901960784,
"line_max": 117,
"alpha_frac": 0.6607445853,
"autogenerated": false,
"rati... |
"""Bond graph for mBuild Compounds.
NOTE: The functions 'connected_components' and '_bfs' have been obtained (with
modifications) from the Networkx Python package, which is distributed under the
following BSD license:
Copyright (C) 2004-2016, NetworkX Developers
Aric Hagberg <hagberg@lanl.gov>
Dan Schult <dschult@col... | {
"repo_name": "mosdef-hub/mbuild",
"path": "mbuild/bond_graph.py",
"copies": "2",
"size": "6551",
"license": "mit",
"hash": 4667632209853103000,
"line_mean": 33.1197916667,
"line_max": 79,
"alpha_frac": 0.6093726149,
"autogenerated": false,
"ratio": 4.381939799331104,
"config_test": false,
"h... |
# Bonobo data-processing toolkit.
#
# Bonobo is a line-by-line data-processing toolkit for python 3.5+ emphasizing simplicity and atomicity of data
# transformations using a simple directed graph of python callables.
#
# Licensed under Apache License 2.0, read the LICENSE file in the root of the source tree.
import sy... | {
"repo_name": "hartym/bonobo",
"path": "bonobo/__init__.py",
"copies": "2",
"size": "1663",
"license": "apache-2.0",
"hash": -3591764328932976600,
"line_mean": 37.6744186047,
"line_max": 118,
"alpha_frac": 0.6794948888,
"autogenerated": false,
"ratio": 3.3326653306613228,
"config_test": false,
... |
"""Bonus mode for MPF."""
from mpf.core.mode import Mode
class Bonus(Mode):
"""Bonus mode for MPF.
Give a player bonus for their achievements, but only if the machine is not
tilted.
"""
__slots__ = ["bonus_score", "settings", "display_delay", "bonus_entries", "bonus_iterator"]
def __init__... | {
"repo_name": "missionpinball/mpf",
"path": "mpf/modes/bonus/code/bonus.py",
"copies": "1",
"size": "6394",
"license": "mit",
"hash": -2872269407365001000,
"line_mean": 35.1242937853,
"line_max": 95,
"alpha_frac": 0.5769471379,
"autogenerated": false,
"ratio": 3.9615861214374224,
"config_test":... |
"""Bonus Points model definition."""
import datetime
'''
Created on Aug 5, 2012
@author: Cam Moore
'''
import random
from django.db import models, IntegrityError
from django.contrib.auth.models import User
class BonusPoint(models.Model):
"""Represents universal bonus points."""
point_value = models.IntegerF... | {
"repo_name": "jtakayama/makahiki-draft",
"path": "makahiki/apps/widgets/bonus_points/models.py",
"copies": "9",
"size": "2427",
"license": "mit",
"hash": -5275867636412034000,
"line_mean": 39.45,
"line_max": 88,
"alpha_frac": 0.5611866502,
"autogenerated": false,
"ratio": 4.649425287356322,
"c... |
# Bonus Question
# Redo exercise6 but have the SSH connections happen concurrently using either threads or processes (see example).
# What main issue is there with using threads in Python?
from getpass import getpass
import threading
import time
from netmiko import ConnectHandler
def connect(host):
ssh_connectio... | {
"repo_name": "linkdebian/pynet_course",
"path": "class4/exercise9.py",
"copies": "1",
"size": "1261",
"license": "apache-2.0",
"hash": 4694120296804886000,
"line_mean": 30.55,
"line_max": 128,
"alpha_frac": 0.6344171293,
"autogenerated": false,
"ratio": 3.266839378238342,
"config_test": false,... |
"""booking 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-bas... | {
"repo_name": "moas/carbooking",
"path": "config/urls.py",
"copies": "1",
"size": "1214",
"license": "mit",
"hash": -1111294780708946400,
"line_mean": 36.9375,
"line_max": 79,
"alpha_frac": 0.6935749588,
"autogenerated": false,
"ratio": 3.613095238095238,
"config_test": false,
"has_no_keyword... |
"""bookit URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/dev/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-base... | {
"repo_name": "mutaku/bookit",
"path": "bookit_django/bookit/urls.py",
"copies": "1",
"size": "1217",
"license": "bsd-2-clause",
"hash": 8143998778616670000,
"line_mean": 40.9655172414,
"line_max": 88,
"alpha_frac": 0.6959737058,
"autogenerated": false,
"ratio": 3.4475920679886687,
"config_test... |
"""bookkeeper URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/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": "xmas-bunch/bookkeeper",
"path": "bookkeeper/urls.py",
"copies": "1",
"size": "1030",
"license": "mit",
"hash": 1645953644621210600,
"line_mean": 33.3333333333,
"line_max": 79,
"alpha_frac": 0.7038834951,
"autogenerated": false,
"ratio": 3.503401360544218,
"config_test": false,
... |
# bookkeeping.py module
"""
Bookkeeping functions to help reduce F2 data.
"""
def mkdirectories(program, targetname, obsdate, reduxdate, bands):
"""
Create the directory structure organizing the reduction of data.
Can process only one target and obsdate/reduxdate combination
at a time. Multiple bands... | {
"repo_name": "KathleenLabrie/KLpyastro",
"path": "klpyastro/utils/bookkeeping.py",
"copies": "1",
"size": "12898",
"license": "isc",
"hash": -8656272936232241000,
"line_mean": 32.3281653747,
"line_max": 80,
"alpha_frac": 0.582726004,
"autogenerated": false,
"ratio": 4.053425518541798,
"config_... |
"""bookloop URL Configuration
The `urlpatterns` list routes URLs to site. For more information please see:
https://docs.djangoproject.com/en/dev/topics/http/urls/
Examples:
Function site
1. Add an import: from my_app import site
2. Add a URL to urlpatterns: url(r'^$', site.home, name='home')
Class-based ... | {
"repo_name": "liuyonggg/learning_python",
"path": "bookloop/bookloop/urls.py",
"copies": "1",
"size": "2127",
"license": "mit",
"hash": 2884746586488373000,
"line_mean": 52.175,
"line_max": 107,
"alpha_frac": 0.6727785614,
"autogenerated": false,
"ratio": 3.2473282442748093,
"config_test": fal... |
# bookmanager.py
import os
from flask import Flask, render_template, request, redirect
from flask_sqlalchemy import SQLAlchemy
project_dir = os.path.dirname(os.path.abspath(__file__))
database_file = "sqlite:///{}".format(os.path.join(project_dir, "bookdatabase.db"))
app = Flask(__name__)
app.config['SQLALCHEMY_DATAB... | {
"repo_name": "nitin-cherian/Webapps",
"path": "Codementor.io/GarethDwyer/apps/flask-crud-app/bookmanager.py",
"copies": "1",
"size": "1451",
"license": "mit",
"hash": 9055794629814796000,
"line_mean": 24.4561403509,
"line_max": 83,
"alpha_frac": 0.6409372846,
"autogenerated": false,
"ratio": 3.3... |
"""Bookmark (de)serialization logic."""
from __future__ import unicode_literals
import decimal
import datetime
import base64
import uuid
import dateutil.parser
import csv
from io import StringIO
class InvalidPage(ValueError):
"""An invalid page marker (in either tuple or bookmark string form) was
provided to... | {
"repo_name": "djrobstep/sqlakeyset",
"path": "sqlakeyset/serial/serial.py",
"copies": "1",
"size": "4271",
"license": "unlicense",
"hash": 6118636042525150000,
"line_mean": 24.4226190476,
"line_max": 88,
"alpha_frac": 0.5743385624,
"autogenerated": false,
"ratio": 4.025447690857681,
"config_te... |
"""bookmarker URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/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": "dellsystem/bookmarker",
"path": "src/bookmarker/urls.py",
"copies": "1",
"size": "4874",
"license": "mit",
"hash": -3290980414198042600,
"line_mean": 47.74,
"line_max": 97,
"alpha_frac": 0.6378744358,
"autogenerated": false,
"ratio": 3.152652005174644,
"config_test": false,
"ha... |
# bookmark/models.py
# Brought to you by We Vote. Be good.
# -*- coding: UTF-8 -*-
from candidate.models import CandidateManager
from django.db import models
from exception.models import handle_record_found_more_than_one_exception,\
handle_record_not_found_exception, handle_record_not_saved_exception
from measure.... | {
"repo_name": "wevote/WeVoteServer",
"path": "bookmark/models.py",
"copies": "1",
"size": "16943",
"license": "mit",
"hash": -7331307385298397000,
"line_mean": 48.5409356725,
"line_max": 119,
"alpha_frac": 0.6199020244,
"autogenerated": false,
"ratio": 3.863854047890536,
"config_test": true,
... |
# bookmarks http://www.one-tab.com/page/Ds6dSsBoSX24cD8OSxqKcA
import pygame
import sys
import math
from pygame.locals import *
from led import LED
from buttons import Button
import png # pypng
from astro_pi import AstroPi
import copy, time
saved = True
warning = False
pygame.init()
pygame.font.init()
ap=AstroPi()
sc... | {
"repo_name": "astro-pi/RPi_8x8GridDraw",
"path": "8x8grid-astropi.py",
"copies": "1",
"size": "12448",
"license": "mit",
"hash": -6588862339660097000,
"line_mean": 24.046277666,
"line_max": 125,
"alpha_frac": 0.6598650386,
"autogenerated": false,
"ratio": 2.6395250212044106,
"config_test": fal... |
"""bookmarks URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/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": "EssaAlshammri/django-by-example",
"path": "bookmarks/bookmarks/bookmarks/urls.py",
"copies": "1",
"size": "1150",
"license": "mit",
"hash": -1240119842292665000,
"line_mean": 37.3333333333,
"line_max": 79,
"alpha_frac": 0.7017391304,
"autogenerated": false,
"ratio": 3.6392405063291... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.