Create your own dataset for machine learning, same format as CIFAR-10 dataset, via PIL and numpy

Refers:
http://www.cs.toronto.edu/~kriz/cifar.html
https://www.tensorflow.org/tutorials/deep_cnn


The CIFAR-10 dataset consists of 60000 32x32 colour images in 10 classes.

ClixSense Click on the cat job use the image that its size is 128 x 96 px, and
the image is cat or dog, no other type.
I want to use CNN to do machine learning for this job. 
I collected some images now.

The key python codes to append one image with label to the dataset is as below:

from PIL import Image
import numpy as np
  im = Image.open(filename)
  im = (np.array(im))

  r = im[:,:,0].flatten()
  g = im[:,:,1].flatten()
  b = im[:,:,2].flatten()

  if iscat:
    label = [0]
  else:
    label = [1]

  out  = np.array(list(label) + list(r) + list(g) + list(b), np.uint8)
  out.tofile(dataset)





救赎主活着

我知道我的救赎主活着,末了必站立在地上。 (约伯记 19:25 和合本)
I know that my redeemer lives, and that in the end he will stand on the earth.  (Job 19:25 NIV)
我这皮肉灭绝之后,我必在肉体之外得见 神。 (约伯记 19:26 和合本)
And after my skin has been destroyed, yet in my flesh I will see God;  (Job 19:26 NIV)

谁能知道自己的错失呢?愿你赦免我隐而未现的过错。 (诗篇 19:12 和合本)
But who can discern their own errors? Forgive my hidden faults.  (Psalms 19:12 NIV)
求你拦阻仆人不犯任意妄为的罪,不容这罪辖制我,我便完全,免犯大罪。 (诗篇 19:13 和合本)
Keep your servant also from willful sins; may they not rule over me. Then I will be blameless, innocent of great transgression.  (Psalms 19:13 NIV)
耶和华—我的磐石,我的救赎主啊,愿我口中的言语、心里的意念在你面前蒙悦纳。 (诗篇 19:14 和合本)
May these words of my mouth and this meditation of my heart be pleasing in your sight, Lord , my Rock and my Redeemer.  (Psalms 19:14 NIV)


Installing tensorflow with CPU support only from source on Ubuntu 16.04

Refers :
https://www.tensorflow.org/install/install_sources
https://bazel.build/versions/master/docs/install.html


神是我们的终极帮助

约伯回答说: (约伯记 16:1 和合本)
Then Job replied:  (Job 16:1 NIV)
这样的话我听了许多;你们安慰人,反叫人愁烦。 (约伯记 16:2 和合本)
“I have heard many things like these; you are miserable comforters, all of you!  (Job 16:2 NIV)

有时家人和朋友的帮助是有限的,因此

我要向山举目;我的帮助从何而来? (诗篇 121:1 和合本)
I lift up my eyes to the mountains— where does my help come from?  (Psalms 121:1 NIV)
我的帮助从造天地的耶和华而来。 (诗篇 121:2 和合本)
My help comes from the Lord , the Maker of heaven and earth.  (Psalms 121:2 NIV)

有人靠车,有人靠马,但我们要提到耶和华—我们 神的名。 (诗篇 20:7 和合本)
Some trust in chariots and some in horses, but we trust in the name of the Lord our God.  (Psalms 20:7 NIV)


因着耶稣 我们如约伯一样有复活的盼望和信心



人为妇人所生,日子短少,多有患难; (约伯记 14:1 和合本)
“Mortals, born of woman, are of few days and full of trouble.  (Job 14:1 NIV)
出来如花,又被割下,飞去如影,不能存留。 (约伯记 14:2 和合本)
They spring up like flowers and wither away; like fleeting shadows, they do not endure.  (Job 14:2 NIV)
但人死亡而消灭;他气绝,竟在何处呢? (约伯记 14:10 和合本)
But a man dies and is laid low; he breathes his last and is no more.  (Job 14:10 NIV)
惟愿你把我藏在阴间,存于隐密处,等你的忿怒过去;愿你为我定了日期,记念我。 (约伯记 14:13 和合本)
“If only you would hide me in the grave and conceal me till your anger has passed! If only you would set me a time and then remember me!  (Job 14:13 NIV)
人若死了岂能再活呢?我只要在我一切争战的日子,等我被释放(或译:改变) 的时候来到。 (约伯记 14:14 和合本)
If someone dies, will they live again? All the days of my hard service I will wait for my renewal to come.  (Job 14:14 NIV)


死荫算什么 神必安慰,显为光明


那地甚是幽暗,是死荫混沌之地;那里的光好像幽暗。 (约伯记 10:22 和合本)
to the land of deepest night, of utter darkness and disorder, where even the light is like darkness.”  (Job 10:22 NIV)
他将深奥的事从黑暗中彰显,使死荫显为光明。 (约伯记 12:22 和合本)
He reveals the deep things of darkness and brings utter darkness into the light.  (Job 12:22 NIV)

我虽然行过死荫的幽谷,也不怕遭害,因为你与我同在;你的杖,你的竿,都安慰我。 (诗篇 23:4 和合本)
Even though I walk through the darkest valley, I will fear no evil, for you are with me; your rod and your staff, they comfort me.  (Psalms 23:4 NIV)


How to config Oracle java on your Ubuntu

install via ppa source
sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

sudo apt-get install oracle-java8-installer

sudo update-java-alternatives -s java-8-oracle


fixed: embedded-redis: Unable to run on macOS Sonoma

Issue you might see below error while trying to run embedded-redis for your testing on your macOS after you upgrade to Sonoma. java.la...