Author: Liran B.H

Python Machine Learning Example – Linear Regression

In my previous post, I went over the basic concepts in machine learning and I used a very small amount of data. I got great feedbacks but also notes to make more complex example with bigger dataset. In this post I will use a bigger dataset and use pandas , seaborn and scikit-learn to illustrate […]

Read more

Android ION

One of the features google added to linux kernel is a general purpose allocator /dev/ion. The new allocator allows us to allocate memory from different heaps and devices, virtual and physical User space usage #include<stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <sys/ioctl.h> #include <sys/mman.h> #include “/home/developer/kernel3.4/goldfish/include/linux/ion.h” void main() { int *p; struct ion_fd_data fd_data; […]

Read more

Understanding Linux Kernel Preemption

While configuring a Linux kernel, we can set some parameters that effect the system behavior. You can work with different priorities, scheduling classes and preemption models. It is very important to understand and choose the right parameters. In this post I will cover the different preemption models and how does each one effect the user and […]

Read more

Creating a Java VM from Native code

On Android init phase we are running init application that uses its init scripts to start all the code system services. We can add a new daemon easily if we are building a ROM by add an empty folder, adding Android.mk file and C/C++ source file. In this way we can run C/C++ code but […]

Read more

Linux Control Groups

Using cgroups you can limit resource usage of processes , for example if you have a web server and you want limit its memory usage to 1GB its very easy to do with cgroups. This is also a basic building block for containers First we need to install some tools (in my example im using […]

Read more

Creating a Linux bridge

A network bridge helps you connect 2 different networks with the same characteristics (Ethernet for example). Its very easy to implement it in linux using some tools Example We run Qemu  image with tap interface – we can connect from the qemu image to the linux host but we cant access the entire network (internet) […]

Read more

10 Python Interview Questions You need to know

Python is very popular programming language with many job offers. I collected some questions (with answers) from many students interviews. Test yourself: are you ready to work with python? 1. Base and derived classes: Look at the following code: class A(object): def show(self): print ‘base show’ class B(A): def show(self): print ‘derived show’ obj = […]

Read more

Java and C/C++: JNI Guide

While writing Android application or other generic java application you sometimes need to write code in C/C++. Java is a dynamic language with a lot of security checks for example on every array access, every type cast , on function call and return and more. those checks affect performance and if you want to manipulate […]

Read more

Simple Image Processing with Python

Python is not a programming language for writing algorithms. It is a dynamic language , secure and high level. If we want to write a complex algorithm we need pointers for efficiency and we will probably use C/C++. Python do have tons of external packages, some of them implemented in C and using a simple […]

Read more

Angular 5 – Routing (Practical Guide)

Angular provides an easy way to create and work with components , In a single page application(SPA) it is essential to work with multiple views/screens, navigate and communicate between them. Angular provides router service to manage this in a very easy way. We can create a routing module while creating a new application or add […]

Read more