<s> import numpy as np <EOL> from scipy . integrate import odeint <EOL> from bokeh . plotting import figure , show , output_file <EOL> sigma = <NUM_LIT:10> <EOL> rho = <NUM_LIT> <EOL> beta = <NUM_LIT> / <NUM_LIT:3> <EOL> theta = <NUM_LIT:3> * np . pi / <NUM_LIT:4> <EOL> def lorenz ( xyz , t ) : <EOL> x , y , z = xyz <EOL> x_dot = sigma * ( y - x ) <EOL> y_dot = x * rho - x * z - y <EOL> z_dot = x * y - beta * z <EOL> return [ x_dot , y_dot , z_dot ] <EOL> initial = ( - <NUM_LIT:10> , - <NUM_LIT:7> , <NUM_LIT> ) <EOL> t = np . arange ( <NUM_LIT:0> , <NUM_LIT:100> , <NUM_LIT> ) <EOL> solution = odeint ( lorenz , initial , t ) <EOL> x = solution [ : , <NUM_LIT:0> ] <EOL> y = solution [ : , <NUM_LIT:1> ] <EOL> z = solution [ : , <NUM_LIT:2> ] <EOL> xprime = np . cos ( theta ) * x - np . sin ( theta ) * y <EOL> colors = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , ] <EOL> p = figure ( title = "<STR_LIT>" ) <EOL> p . multi_line ( np . array_split ( xprime , <NUM_LIT:7> ) , np . array_split ( z , <NUM_LIT:7> ) , <EOL> line_color = colors , line_alpha = <NUM_LIT> , line_width = <NUM_LIT> ) <EOL> output_file ( "<STR_LIT>" , title = "<STR_LIT>" ) <EOL> show ( p ) </s>
