Skip to content

Instantly share code, notes, and snippets.

hadoop jar /usr/lib/hadoop-0.20-mapreduce/contrib/streaming/hadoop-streaming-2.6.0-mr1-cdh5.12.0.jar \
-file /home/cloudera/mapper.py -mapper /home/cloudera/mapper.py \
-file /home/cloudera/reducer.py -reducer /home/cloudera/reducer.py \
-input /user/cloudera/*.py -output /user/cloudera/output
from flask import Flask
from flask import request
import json
app = Flask(__name__)
@app.route('/')
def hello():
return "Check Code of countries"
@kchandan
kchandan / Vagrantfile
Created January 21, 2018 19:37
Ambari Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "geerlingguy/centos7"
config.vm.network "forwarded_port", guest: 8080, host: 8080
config.vm.network "public_network"
@kchandan
kchandan / postgres-cheatsheet.md
Created May 31, 2020 21:27 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@kchandan
kchandan / rke2-commands.md
Created March 9, 2024 03:04 — forked from superseb/rke2-commands.md
RKE2 commands

RKE2 commands

Install

curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server