Skip to content

Instantly share code, notes, and snippets.

View mysticBliss's full-sized avatar
🏠
Working from home

myticBliss mysticBliss

🏠
Working from home
View GitHub Profile
ambari-server stop
ambari-agent stop
pkill -9 java
#################################
# Remove Packages
################################
yum -y remove ambari-\*
yum -y remove hcatalog\*
yum -y remove hive\*
@mysticBliss
mysticBliss / tech-interview-guide.md
Created November 27, 2017 07:39 — forked from vicyap/tech-interview-guide.md
tech interview guide

A quick guide on getting ready for tech interviews.

Chitchat like a pro.

Before diving into code, most interviewers like to chitchat about your background. They're looking for:

  • Metacognition about coding. Do you think about how to code well?
  • Ownership/leadership. Do you see your work through to completion? Do you fix things that aren't quite right, even if you don't have to?
  • Communication. Nerd out about stuff. Show you're proud of what you've done, you're amped about what they're doing, and you have opinions about languages and workflows.
  • STAR (Situation, Task, Action, Result). It’s good to have a project in your back pocket that you can talk about in a direct and concise way.

Coding Question

Interview Sample Question

    1. why is not all memory free when Python exits?
    1. write the output of below code:
   var1 = lambda q: q * 5
   var2 = lambda q: q * 3
   x = 2
   x = var1(x)
   x = var1(x)
   x = var1(x)
@mysticBliss
mysticBliss / python-interview-tests
Created November 27, 2017 07:34 — forked from davidlu1001/python-interview-tests
python-interview-tests
http://programmers.stackexchange.com/questions/21917/python-interview-questions
https://github.com/sigmavirus24/python-interview-questions
https://gist.github.com/xiangzhuyuan/7454001522d275021b2d
https://github.com/ContinuumIO/interview-questions
https://github.com/Flowerowl/python_articles
http://marselester.com/preparation-to-python-interview.html
https://github.com/zachwill/cracking-the-coding-interview
http://www.bogotobogo.com/python/python_interview_questions.php
https://www.quora.com/What-are-good-Python-interview-questions
https://www.reddit.com/r/Python/comments/1knw7z/python_interview_questions
# Given a two dictionaries empdesig and empdet containing details about employees and managers in a key value pair - print a hierarchical tree
# empdesig = {'Simha': 'Khan', 'Khan': '', 'Vijay': 'Simha', 'Sai': 'Khan', 'Kiran': 'Kiran'}
# empdet = {'Simha': 'Khan', 'Khan': '', 'Vijay': 'Simha', 'Sai': 'Khan', 'Kiran': 'Kiran'}
# If an employee has manager null(like Khan) or has manager as himself - then they are board members and have no bosses.
for emp,mgr in empdesig.items():
new[emp] = {key:'' for key,value in empdesig.items() if value == emp}
for k,v in new.items():
@mysticBliss
mysticBliss / Introduction to Python.ipynb
Created November 27, 2017 07:31 — forked from fonnesbeck/Introduction to Python.ipynb
python/Introduction to Python.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mysticBliss
mysticBliss / pkl_to_json.py
Created November 27, 2017 07:29 — forked from hailiang-wang/pkl_to_json.py
Convert python pickle file to json
#!/usr/local/bin/python3
'''
Convert a pkl file into json file
'''
import sys
import os
import _pickle as pickle
import json

Intro to Advanced Python

By Adam Anderson

adam.b.anderson.96@gmail.com

These notes are mostly just summaries of the provided references. The purpose of this document is to centralize the resources I found useful so they would be easy to find. Most definitions and explanations are paraphrased or quoted directly from the sources.

Table of Contents