Skip to content

Instantly share code, notes, and snippets.

View harpresing's full-sized avatar

Harpreet Singh harpresing

  • Dublin, Ireland
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AboutToPasteTabsWithCancel</key>
<true/>
<key>AboutToPasteTabsWithCancel_selection</key>
<integer>2</integer>
<key>AlternateMouseScroll</key>
<true/>

Introduction

In purely functional programming you don't tell the computer what to do as such but rather you tell it what stuff is. The factorial of a number is the product of all the numbers from 1 to that number, the sum of a list of numbers is the first number plus the sum of all the other numbers, and so on. You express that in the form of functions.

The only thing a function can do is calculate something and return it as a result.

Haskell is lazy. That means that unless specifically told otherwise, Haskell won't execute functions and calculate things until it's really forced to show you a result.

Create a Learning switch

Run a basic hub $./pox.py log.level --DEBUG misc.of_tutorial

When the switch is connected pox shows this:

INFO:openflow.of_01:[Con 1/1] Connected to 00-00-00-00-00-01
DEBUG:misc.of_tutorial:Controlling [00-00-00-00-00-01 1]

Introduction

Open vSwitch is well suited to function as a virtual switch in VM environments. In addition to exposing standard control and visibility interfaces to the virtual networking layer, it was designed to support distribution across multiple physical servers. Open vSwitch supports multiple Linux-based virtualization technologies including Xen/XenServer, KVM, and VirtualBox.

Question 1

Use newtons method to find square roots

Solution

package main

import (

Introduction

Hadoop moves computation to data. Hardware failures are handled automatically. It is designed to be highly scalable. Hadoops origins come from three papers from google, Google File System ---> Apache HDFS, MapReduce ---> Apache Mapreduce and BigTable ---> Apache HBASE.

Hadoop Components:

  • Hadoop Common - Contains the basic libraries required by the other modules
  • HDFS - Distributed Storage
  • Hadoop MapReduce - Programming Model, Distributed Processing

Introduction

Go is a compiled language, statically typed language, with the runtime built into the applications since it does not have a Virtual Machine like Java. It is based mostly on C, but influenced by other languages.

Go implements many OOP concepts:

  • Encapsulation with types and structs
  • Polymorphism by Interfaces = Contracts that can be implemented by interfaces and types
  • Custom types = Implement one or more interfaces
  • Custom types have custom methods
object Lists {

  /**
   * This method computes the sum of all elements in the list xs. There are
   * multiple techniques that can be used for implementing this method, and
   * you will learn during the class.
   *
   * For this example assignment you can use the following methods in class
   * `List`:
\documentclass[11pt]{article} %This is the preamble of the doc
\usepackage[top=1in, bottom=1in, left=1in,
right=1in]{geometry}
%You can use packages to make Latex more sweet
\usepackage{amsfonts} %This is used for real no symbol etc
\usepackage{graphicx} %used for inserting images
\usepackage{cite} % This is used for citing using bibtex
@harpresing
harpresing / learning-nodejs.md
Created February 7, 2016 00:19
Free Code Camp tutorial on NodeJS

To make a Node.js program, create a new file with a .js extension and
start writing JavaScript! Execute your program by running it with the node
command. e.g.:

 $ node program.js  

You can write to the console in the same way as in the browser:

 console.log("text");