Gnome 3 on Freebsd (self documentation)
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
Playing with FreeBSD
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.
Compile and Install GCC 4.9.2 from source on OSX Yosemite
based on Solarian Programmer.
Compare Native Loop Time in Python with "homemade" Fortran Module
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
Using 'Home-Made' Fortran Binary as Python module
Python is easy to use, but it's slow, especially for loop computation.
3D Waterwave Simulation using Python
I used Numpy Matplotlib with Animation and 3d Plot module on my OS X Yosemite.
3D Surface Plot Animation using Matplotlib in Python
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
3D Surface Plot using Matplotlib in Python
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 = n
Matplotlib Animation in Python
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 = simDat
Playing with Matplotlib Animation in Python
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.
Playing (again) with 'Home Made' Vector in Delphi
Here it is. I create a vector as new type, which is in itself is three dimension array. Then I declared u as vector with three dimension; u (h,i,j) where h = 0, 1, 2 as physical component (eg: height, velocity, momentum) i , j = 0, 1, 2, ..., n as row n column So if we read u[0,1,1], it means height value at coordinate (1,1); u[1,1,1] is the velocity value; [2,1,1] is the momentum value at the same coordinate. Trying some of properties of it. I found out that we can initialize all component of vector-u with this one line code u:=fu(h[i,j],i,j); so the component u(h,i,j) will filled. Notice that the function has vector (or in this case array) return value.