Skip to content

Instantly share code, notes, and snippets.

View yogeshc's full-sized avatar

Yogesh yogeshc

View GitHub Profile
Q 1 - In a Hadoop cluster, what is true for a HDFS block that is no longer available due to disk corruption or machine failure?
B - It can be replicated form its alternative locations to other live machines.
Q 2 - Which one of the following is not a main component of HBase?
B - Nagios.
Q 3 - When a client communicates with the HDFS file system, it needs to communicate with
C - both the namenode and datanode
Q 4 - Which of the following is not a Hadoop operation mode?
@yogeshc
yogeshc / html
Created November 15, 2017 04:47
Model for a simple IOT Platfrom mapping users, gateways and end nodes
<html xmlns:tomboy="http://beatniksoftware.com/tomboy" xmlns:size="http://beatniksoftware.com/tomboy/size" xmlns:link="http://beatniksoftware.com/tomboy/link"><head><META http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Business Logic Note from 2017-11-15 09:47:06.440</title><style type="text/css">
body { }
h1 { font-size: xx-large;
font-weight: bold;
border-bottom: 1px solid black; }
div.note {
position: relative;
display: block;
padding: 5pt;
margin: 5pt;
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>in.intellisights</groupId>
<artifactId>HibernateExample</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>HibernateExample</name>
'''Inverse Birthday Problem'''
__author__ = 'yogesh'
DAYS = 366
def get_number_of_people(probability):
'''
get_number_of_people takes in a minimum probability that should be satisfied and gives the
number of people who should be present to satisfied this condition
Compiled from "LoopTesting.java"
public class LoopTesting.LoopTesting {
public LoopTesting.LoopTesting();
Code:
0: aload_0
1: invokespecial #1 // Method java/lang/Object."<init>":()V
4: return
public static void main(java.lang.String[]);
Code:
package LoopTesting;
public class LoopTesting {
public static void main(String[] args) {
for (int i=0; i<10; i++) {
System.out.println("hello++");
}
for (int j=0; j<10; j+=1) {
# Refer - http://ais.informatik.uni-freiburg.de/teaching/ss11/ki/exercises/search.py
#! /usr/bin/env python
"""
This is a solution to the Missionaries and Cannibalis problem.
Uses a breadth first search and the representation as described
in the lecture. Call without any arguments
$ ./search.py
to search for a solution from the initial state (3,3,1).
@yogeshc
yogeshc / SoundViewController
Created October 9, 2014 11:08
AVAudio Issue
//
// DhwaniBoardViewController.swift
// DhwaniBoard
//
// Created by Yogesh on 05/10/2014.
// Copyright (c) 2014 appcodr. All rights reserved.
//
import Foundation
import UIKit
@yogeshc
yogeshc / SoundBoard
Created October 7, 2014 13:17
Simple example of a soundboard app created using swift for iOS
//
// DhwaniBoardViewController.swift
// DhwaniBoard
//
// Created by Yogesh on 05/10/2014.
// Copyright (c) 2014 appcodr. All rights reserved.
//
import Foundation
import UIKit
@yogeshc
yogeshc / gist:5961221
Created July 9, 2013 20:55
Node js grader to check for checking presence of specified HTML tags/attributes
#!/usr/bin/env node
/*
Automatically grade files for the presence of specified HTML tags/attributes.
Uses commander.js and cheerio. Teaches command line application development
and basic DOM parsing.
References:
+ cheerio
- https://github.com/MatthewMueller/cheerio