Thursday, October 13, 2016

/bin/sh^M: bad interpreter Errors

This is just to remind me of the errors that I experienced alot which is : /bin/sh^M: bad interpreter Errors , mostly I experienced this when running .sh files which is edited on windows (using notepad, etc) and then upload it to Centos/Ubuntu and run it.

Monday, August 22, 2016

Run R in Jupyter Notebook on Ubuntu 16.04

R is a language and environment for statistical computing and graphics. It is a GNU project which is similar to the S language and environment which was developed at Bell Laboratories. R provides a wide variety of statistical (linear and nonlinear modelling, classical statistical tests, time-series analysis, classification, clustering, …) and graphical techniques, and is highly extensible.

You can find more information of R language on this link. R has its own IDE called RStudio which provide you with Matlab like environment for running R, and it also provide a Web IDE.

using Jupyter Notebook as R interface is an alternative to the RStudio, its fairly easy to setup and activated, we will discuss in depth about it in this post

Autorun JupyterNotebook using Supervisor on Ubuntu 16.04

On this post I will discuss how to make Jupyter Notebook autorun whenever the computer start, I will utilize Supervisor to do that. this post will discuss from how to set and configure the supervisor job

Configure Jupyter Notebook

In the previous post, I have show you how to install jupyterhub, then on this post I will try to show you how to configure jupyterhub using configuration file

Sunday, August 21, 2016

Install Jupyter Notebook on Ubuntu 16.04

The Jupyter Notebook is a web application that allows you to create and share documents that contain live code, equations, visualizations and explanatory text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, machine learning and much more.

I use Jupyter notebook to document R, Python and Spark scripts, I`ll put the configuration and setting up R on another post later on

Sunday, August 7, 2016

C++ List

List is almost the same as array, but array is limited and list is not (well except for the memory limitation, but you rarely used that much)

Monday, August 1, 2016

C++ Matrix

Then after array, there's matrix. Matrix / matrices is used most on spatial problem, there's also 3D matrix and the concept is the same

C++ Array

One of the most used things on competitive programming is array, here's how to create it on C++

Beginning Logstash Configuration


This will be a starting point in understanding logstash configuration, this post will cover about
- how logstash configuration works
- how logstash configuration is written
- and the most basic logstash configuration

Wednesday, July 20, 2016

View all tables row count in PostgreSQL

This script will make your life easier to view the total row on all your tables, you need to create a function for it, but its quite easy to maintain

Sunday, July 3, 2016

I start learning about Tizen

its been a while since I learn something new, last year is all about big data technology, Spark, Hadoop, jupyter notebook, etc.. so this year I decide to learn something new from the client side development area.
Tizen seems to be an interesting topic to learn about, so I'm going to start blogging about it while learning at the same time.

Sunday, June 19, 2016

C++ Input and Output

Since I have a thing about competitive programming like HackerRank and TopCoder, I decide to start blog about it while learning C++ again after 8 years not using it.
I wont explain much unless needed, since the code explains itself
The first one is pretty simple, it starts with input and output

Thursday, June 16, 2016

Copy File using SSH in Ubuntu 16.04

its just my note on how to copy files between VM, this command can only works when ssh service is already set and running

Sunday, June 12, 2016

Find Active Session and Kill it on PostgreSQL

I happen to encounter a case when I want to drop a database and not allowed by system since there are an active session. I ended up having to restart database and the perform the drop. this is not ideal if there are more than 2 database or its already run on production, but here's how to do it

Restore PostgreSQL Database

Without having to use tools like pgAdmin, you can backup and restore database using console command

Install and Configure Supervisor on Ubuntu 16.04

The following will explain how to install and configure supervisor on Ubuntu
if you have a long running service that you want to activate on linux, say an apache web server, a jupyter notebook service,etc.. then you would want to have that service run and monitored by supervisor

Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems.
It shares some of the same goals of programs like launchd, daemontools, and runit. Unlike some of these programs, it is not meant to be run as a substitute for init as “process id 1”. Instead it is meant to be used to control processes related to a project or a customer, and is meant to start like any other program at boot time.

Saturday, June 11, 2016

Configure Network on Ubuntu 16.04

This step is to configure network on ubuntu when first installed

Turn off Automatic Updates on Ubuntu 16.04

Automatic updates on Ubuntu is good, but sometimes you want to turn automatic updates off, here's how to do it

Find out Largest directory size in Ubuntu 16.04

This commands will help you to identify which directory has the largest size, the result will be the list of directory and files with its size
...
747 M hue
781 M incubator-zeppelin-0.5.0
798 M zeppelin-0.5.0
...