install it using #pkg install gnome3 /etc/fstab  proc /proc procfs rw 0 0 /etc/rc.conf gdm_enable=“YES” gnome_enable="YES" The menu is missing install Parallel Tools

Got boot-only iso and managed to install it on my Parallel Desktop on my Macbook Air with Yosemite. 

Of course it just CLI.

Strange, the root shell have tab completion feature, but the normal users didn’t.

(DuckDuckGo-ing)

The answer come from 2003 and 2005 Mailing-List, :)

To enable tab completion

$chsh -s /bin/tcsh   (it didn’t enable tab completion actually , it change shell with tab completion feature :) ) We could so use   $chsh -s /bin/csh    tcsh shell support tab completion too.

This code print d and e as result of two matrix addition, e's using python native code, d's using fortran module compiled with F2PY The code import numpy as np import aravir as ar import time n = 1000 u = np.ones((n,n)) v = np.ones((n,n)) e = np.ones((n,n)) t = time.clock() d = ar.add3(u,v) tfortran= time.clock()-t t = time.clock() for i in range (n): for j in range (n): e[i,j] = u[i,j]+v[i,j] tnative = time.clock()-t print 'fortran ', d print 'native', e print 'tfortran = ', tfortran, ', tnative = ', tnative

Python is easy to use, but it's slow, especially for loop computation.

I used Numpy  Matplotlib with Animation and 3d Plot module on my OS X Yosemite.

And here's the animation

import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation from mpl_toolkits.mplot3d import Axes3D def data(i, z, line): z = np.sin(x+y+i) ax.clear() line = ax.plot_surface(x, y, z,color= 'b') return line, n = 2.*np.pi fig = plt.figure() ax = fig.add_subplot(111, projection='3d') x = np.linspace(0,n,100) y = np.linspace(0,n,100) x,y = np.meshgrid(x,y) z = np.sin(x+y) line = ax.plot_surface(x, y, z,color= 'b') ani = animation.FuncAnimatio

It's slightly modified from before

import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation from mpl_toolkits.mplot3d import Axes3D n = 2.*np.pi fig = plt.figure() ax = fig.add_subplot(111, projection='3d') x = np.linspace(0,n,100) y = np.linspace(0,n,100) x,y = np.meshgrid(x,y) z = np.sin(x+y) line = ax.plot_surface(x, y, z,color= 'b') plt.show()

the result

the snapshot

Here is the update from before

import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation def simData(): t_max = n dt = 1./8 k = 0.0 t = np.linspace(0,t_max,100) while k < t_max: x = np.sin(np.pi*t+np.pi*k) k = k + dt yield x, t def simPoints(simData): x, t = simData[0], simData[1] line.set_data(t, x) return line n = 2.

Coding like this

import numpy as np from matplotlib import pyplot as plt from matplotlib import animation fig = plt.figure() n = 10 x = np.linspace(0,2*np.pi,100) def init(): pass def animate(k): h = np.sin(x+np.pik) plt.plot(x,h) ax = plt.axes(xlim=(0, 2*np.pi), ylim=(-1.1, 1.1)) anim = animation.FuncAnimation(fig, animate,init_func=init,frames=360,interval=20,blit=False) plt.show()

The result
Archive
Label
Popular Posts
Popular Posts
Loading