Meng-custom Perintah/Command di Terminal Ubuntu

Beberapa waktu lalu saya mendapat kesempatan untuk ikut Grand Final Kode Indonesia di Jakarta. Kode Indonesia adalah sebuah kontes pemrograman yang diadakan oleh Kalibrr.

Berbeda dengan kontes pemrograman pada umumnya, pada kontes ini panitia tidak menyediakan komputer atau laptop untuk para finalis. Jadi para finalis dipersilakan untuk menggunakan komputernya masing-masing di Grand Final. Sebenarnya ini peraturan yang aneh karena ini membuat setiap peserta bisa jadi punya “starting-point” yang berbeda kan? misal kualitas komputer, file-file yang tersedia, dsb.

Tapi ya sudah, karena ini aturan panitia sendiri maka saya juga mencoba menyiapkan laptop saya. Hal sederhana yang saya pikirkan adalah:

Meng-custom perintah atau command di terminal Ubuntu: Coba buat perintah sederhana untuk meng-compile sekaligus menjalankan program C++!

Tujuan command tersebut tentu untuk mempersingkat proses compile. Karena saya sendiri biasa tidak menggunakan IDE yang bisa meng-compile program, maka cara saya biasanya untuk meng-compile file C++ adalah dengan menjalankan perintah (command) berikut:

$ g++ mycppfile.cpp -o outfile

Lalu setelah di-compile, dijalankan dengan perintah:

./outfile

Nah, misi sederhana saya saat itu adalah menyederhanakan kedua perintah di atas menjadi sebuah perintah sederhana. Setelah browsing-browsing, berikut ini rangkuman langkah-langkahnya:

  1. Buat sebuah script file, misalnya kita beri nama `customcpp.sh`
  2. Pada baris pertama, tuliskan `#!/bin/bash` lalu tuliskan perintah yang ingin dijalankan di bawahnya seperti di bawah. Pada perintah di bawah `CPPFILE` adalah variabel yang menyimpan argumen yang akan diinputkan saat pemanggilan. Nantinya akan menerima nama file yang akan di-compile.
    #!/bin/bash
    CPPFILE="$1"
    g++ ${CPPFILE}.cpp -o outfile
    ./outfile
  3. Simpan file tersebut, lalu pindahkan ke `/usr/local/bin`, pemindahannya bisa menggunakan command di bawah. SCRIPTNAME adalah nama perintah yang akan dipanggil ketika script di atas di jalankan.
    sudo mv ~/customcpp.sh /usr/local/bin/SCRIPTNAME
  4. Atur permission agar program bisa diakses
    sudo chown root: /usr/local/bin/SCRIPTNAME
    sudo chmod 755 /usr/local/bin/SCRIPTNAME

Dan… selesai!

Setelah selesai, sekarang untuk mengcompile sekaligus menjalankan program C++, saya cukup mengetikkan di terminal command berikut ini:

SCRIPTNAME mycppfile

ya.. setidaknya sedikit lebih cepat dari sebelumnya kan 😉

Sumber:

documentation neural network

How Do I Learn Neural Network (and Deep Learning)

First, I am nobody in this topic, please don’t hesitate to give better suggestion. This is actually just a “documentation” about my experience when I work on my undergraduate thesis in 2015. Once again, please don’t hesitate to discuss and give better suggestion about this topic, or.. correct my English if I made some mistakes 🙂

Background

Okay, before I tell you my story, I’ll tell you about my background when I started to learn neural network. I wrote this section only have one intention, to make you easy measure what you need, nothing else.

  1. I have familiarity with some of mathematical symbols, like how to read sigma symbol, derivative symbol and many others (but not every symbols).
  2. I have familiarity with basic math operation like derivative function, algebra, matrix and vector operation (but only “the basic”).
  3. I’ve never coded in python, but I’ve been using C++ around 2-3 years and I used to code  Matlab style programming language in some project before (and thanks, this knowledge is very helpful)
  4. I studied the Introduction of Artificial Intelligence at the fourth semester in college, but I won’t said I did it well 🙁

After a month googling randomly, I started to make a list what should I learn, the order of the list below it’s just the best order in my opinion. In my experience I jumped many times over the topic because at that time, I didn’t know what I didn’t know 🙁

If you want to learn about Deep Learning, lets begin with: What is Machine Learning?

Then start to learn about Neural Network

Let’s do some math, Backpropagation?

I suggest you to fully-understand this algorithm in order to give some intuitions to help you in model tuning or error handling when you start implement the neural network

  • Easy start : I watched again the neural network demistifyed, and slowly got the intuition how backpropagation work, I followed and tried the math step-by-step
  • Watch the 4th week on Coursera Introduction to Machine Learning
  • Try the example of how backpropagation works : https://mattmazur.com/2015/03/17/a-step-by-step-backpropagation-example/
  • Read carefully the second chapter from http://neuralnetworksanddeeplearning.com/
  • And if you start thinking they have different formula / calculation / interpretation, start to prove that you are wrong. I started to compare all the calculations to understand more

Python for machine learning?

So what is Deep Learning?

What is Convolutional Neural Network (I use CNN in my undergraduate thesis)?

Backpropagation in CNN?

I don’t know it is necessary or not, but I learned it. I think if you understand the basic of backpropagation it’s enough. But if you are curious how backpropgation through max pooling or convolution layer, it does not hurt to learn it.

And…great, It’s done, That’s all my references that I used when I did my undergraduate thesis, I hope it will be useful for someone :/ or at least for me in the future 🙂