fork(1) download
  1. from scipy import stats,around,arange
  2. def f(s,t):
  3. l=len(t);p=[];y=around(stats.norm.pdf((arange(l)-l//2)*.1,scale=s),1)*10
  4. for i in range(l):p+=[[' ']*(max(y)-y[i])];p[i]+=[t[i]]+[' ']*(y[i]-y[0])
  5. for j in zip(*p):print(*j,sep='')
  6.  
  7. f(0.5,'This is a perfectly normal sentence')
Success #stdin #stdout 0.69s 48408KB
stdin
Standard input is empty
stdout
                tly                
              ec    n              
             f       o             
            r         r            
           e           m           
          p             a          
        a                l         
      s                    se      
This i                       ntence