How to Merge Two Docker Images

When working with Docker, it is a good practice to search for some ready-to-use images on Docker Hub before building you own. It is very powerful to have your software architecture distributed in a set of containers, each one does one job. An the best building block of your distributed application is to use official images from Docker Hub. You can trust their functionalities.

In some cases, you may want to have one container do two different jobs. In other few cases, you may want one Docker image to contain dependencies from two different Docker images. This is easily done as long as you have the Dockerfile of each image. Simply, organize them in one file and build it!

However, if you spend most of the time using ready images from Docker Hub, you do not have their source Dockerfile. I spent some time searching for a tool to use it to merge (or flatten) two different Docker images; that I don’t have their Dockerfiles. I was searching for something to do the following:

image1 --
            \
             ---> merged_image_12
            /
image2 --

Although this issue was closed before in two different threads (1, 2), it arises in some scenarios when you want to do something like that!..

http://abdelrahmanhosny.com/2015/07/11/how-to-merge-two-docker-images

An overview on smart pointers

“My last blog post in 2013 was about the pointer in C++, and how most of its daily usages in C++ is now being replaced by classes replacing or managing the pointer. The last case, the RAII like objects called smart pointers is the topic of this post. I want to give an overview over the choices one can make when using smart pointers.

As I studied last year boost, Qt and wxWidgets closer, I saw, that all of them have their own implementations of smart pointers. Also, C++11 brings its own set of two classes of smart pointers. So, with C++11, smart pointers have arrived in the standard, and everyone using C++11 automaticly has 2 different good options for managing memory allocated with new…”

https://meetingcpp.com/index.php/br/items/an-overview-on-smart-pointers.html

Visualizing Docker Containers and Images

“This post is meant as a Docker 102-level post.  If you are unaware of what Docker is, or don’t know how it compares to virtual machines or to configuration management tools, then this post might be a bit too advanced at this time.

This post hopes to aid those struggling to internalize the docker command-line, specifically with knowing the exact difference between a container and an image.  More specifically, this post shall differentiate a simple container from a running container…”

http://merrigrove.blogspot.com.br/2015/10/visualizing-docker-containers-and-images.html

Tarantool – Get your data in RAM. Get compute close to data. Enjoy the performance

  • A drop-in replacement for Lua 5.1, based on LuaJIT 2.0;
    simply use #!/usr/bin/tarantool instead of #!/usr/bin/lua in your script
  • Lua packages for non-blocking I/O, fibers and HTTP
  • MessagePack data format and MessagePack based client-server protocol
  • a built-in database with two data engines: 100% in-memory with optional persistence and a 2-level disk-based B-tree, to use with large data sets
  • secondary key and index iterators support
  • asynchronous master-master replication
  • authentication and access control

http://tarantool.org/

The 50 Most Popular MOOCs of All Time

“Unlike regular college/ university courses, MOOCs can attract many thousands of enrollees around the world. They can come in the form of active course sessions with participant interaction, or as archived content for self-paced study. MOOCs can be free, or there can be a charge – either on a subscription basis or a one-time charge. Free MOOCs sometimes have a paid “verified certificate” option.There are now thousands of MOOCs available worldwide from several hundred colleges, universities and other institutions of higher learning. For your convenience, we’ve compiled a list of 50 of the most popular MOOCs, based on enrollment figures for all sessions of a course. The ranking is based on filtering enrollment data for 185 free MOOCs on various elearning platforms…”

The 50 Most Popular MOOCs of All Time

How We Use Deep Learning to Classify Business Photos at Yelp

“Yelp hosts tens of millions of photos uploaded by Yelpers from all around the world. The wide variety of these photos provides a rich window into local businesses, a window we’re only just peeking through today.

One way we’re trying to open that window is by developing a photo understanding system which allows us to create semantic data about individual photographs. The data generated by the system has been powering our recent launch of tabbed photo browsing as well as our first attempts at content-based photo diversification…”

http://engineeringblog.yelp.com/2015/10/how-we-use-deep-learning-to-classify-business-photos-at-yelp.html

List of books to master JavaScript Development

List of books to master JavaScript Development

Topic Books Price
Basic JavaScript Eloquent JavaScript free
Tooling JavaScript Application Design paid
ES6 Exploring ES6 free
Testing JavaScript Testing Recipes paid
DOM DOM Enlightenment free
Functional Programming JavaScript Allongé, the “Six” Edition free
Object-Oriented Programming JavaScript Spessore free
Async Programming Async JavaScript paid
Design Patterns & Architectures Learning JavaScript Design Patterns free
Single Page Application Single page apps in depth free
Practical Project Building A JavaScript Framework free
Practical Project Building Front-End Web Apps with Plain JavaScript free
Practical Project Human JavaScript free

https://github.com/javascript-society/javascript-path

Python-like Enumeration in C++11

“Range-based for loops in C++11 are a nice addition to the language. However, there is still no support in the STL for enumerating items in a container without creating an extra counter variable that must be incremented separately from the looping variable:

std::list<int> list = { 1, 2, 3, 4, 5, 6, 7 };

int index = 0;  // this is outside the loop block although only used inside it
for (auto x : list)
{
    cout << index << " " << x << endl;
    index ++;  // this has to be incremented manually; error-prone in more complex loop logic
}

Note that the index is not to access the items in the container; it is to keep track of how many items have been processed so far in the loop.

I would like to be able to enumerate items in an STL container as simply as it can be done in Python, i.e. via a generic “enumerate()“:

# Python code: 
list = { "a", "b", "c", "d", "e", "f" }

for index, x in enumerate(list):
    print(index, x)

In C++11, it could look like this:

std::list<int> list = { 1, 2, 3, 4, 5, 6, 7 };

for (auto x : enumerate(list))
    cout << x.index << " " << x.value << endl;

This is concise and clear. The next section provides some background. The main section shows the code that supports the above syntax and more. Finally, some possible extensions…”

http://www.codeproject.com/Tips/1029941/Python-like-Enumeration-in-Cplusplus

Swarm v. Fleet v. Kubernetes v. Mesos

“There are clearly a lot of choices for orchestrating, clustering, and managing containers. That being said, the choices are generally well differentiated. In terms of orchestration, we can say the following:

  • Swarm has the advantage (and disadvantage) of using the standard Docker interface. Whilst this makes it very simple to use Swarm and to integrate it into existing workflows, it may also make it more difficult to support the more complex scheduling that may be defined in custom interfaces.
  • Fleet is a low-level and fairly simple orchestration layer that can be used as a base for running higher level orchestration tools, such as Kubernetes or custom systems.
  • Kubernetes is an opinionated orchestration tool that comes with service discovery and replication baked-in. It may require some re-designing of existing applications, but used correctly will result in a fault-tolerant and scalable system.
  • Mesos is a low-level, battle-hardened scheduler that supports several frameworks for container orchestration including Marathon, Kubernetes, and Swarm. At the time of writing, Kubernetes and Mesos are more developed and stable than Swarm. In terms of scale, only Mesos has been proven to support large-scale systems of hundreds or thousands of nodes. However, when looking at small clusters of, say, less than a dozen nodes, Mesos may be an overly complex solution…”

http://radar.oreilly.com/2015/10/swarm-v-fleet-v-kubernetes-v-mesos.html

Nim for scientific computing

“In the last few months, I have been shifting the focus of my work towards scientific computing, be it for cryptographic applications, machine learning or neural networks. I have been hard-pressed to find an environment that satisfies me fully.

I do most of my daily work in Scala, and while I am still a big fan of it, trying to make it into a tool for scientific programming often hits its limits. A few things are desirable:

  • raw speed, in particular when writing inner loops
  • a predictable memory layout is necessary to be cache-friendly and to interface easily with C libraries
  • the possibility to interface easily with dedicated hardware such as GPUs and FPGAs
  • did I mention speed?…”

http://rnduja.github.io/2015/10/21/scientific-nim/