<s> import itertools <EOL> import numpy as np <EOL> from bokeh . models import HoverTool <EOL> from bokeh . plotting import ColumnDataSource , figure , show , output_server <EOL> TOOLS = "<STR_LIT>" <EOL> xx , yy = np . meshgrid ( range ( <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT:4> ) , range ( <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT:4> ) ) <EOL> x = xx . flatten ( ) <EOL> y = yy . flatten ( ) <EOL> N = len ( x ) <EOL> inds = [ str ( i ) for i in np . arange ( N ) ] <EOL> radii = np . random . random ( size = N ) * <NUM_LIT> + <NUM_LIT> <EOL> colors = [ <EOL> "<STR_LIT>" % ( int ( r ) , int ( g ) , <NUM_LIT> ) for r , g in zip ( <NUM_LIT:50> + <NUM_LIT:2> * x , <NUM_LIT:30> + <NUM_LIT:2> * y ) <EOL> ] <EOL> source = ColumnDataSource ( data = dict ( <EOL> x = x , <EOL> y = y , <EOL> radius = radii , <EOL> colors = colors , <EOL> foo = list ( itertools . permutations ( "<STR_LIT>" ) ) [ : N ] , <EOL> bar = np . random . normal ( size = N ) , <EOL> ) ) <EOL> p = figure ( title = "<STR_LIT>" , tools = TOOLS ) <EOL> p . circle ( x , y , radius = radii , source = source , <EOL> fill_color = colors , fill_alpha = <NUM_LIT> , line_color = None ) <EOL> p . text ( x , y , text = inds , alpha = <NUM_LIT:0.5> , text_font_size = "<STR_LIT>" , <EOL> text_baseline = "<STR_LIT>" , text_align = "<STR_LIT>" ) <EOL> hover = p . select_one ( HoverTool ) . tooltips = [ <EOL> ( "<STR_LIT:index>" , "<STR_LIT>" ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ( "<STR_LIT:foo>" , "<STR_LIT>" ) , <EOL> ( "<STR_LIT:bar>" , "<STR_LIT>" ) , <EOL> ] <EOL> output_server ( "<STR_LIT>" ) <EOL> show ( p ) </s>
