Author: thebuzz

Name of Innovation

nginx

sudo apt-get install nginx sudo service nginx stop sudo nginx -c $PWD/nginx_keep_alive.conf ######### To run Nginx as a “100% transparent” proxy for Elasticsearch ############### events { worker_connections 1024; } http { server { listen 8080; location / { proxy_pass http://localhost:9200; } } } ######################## Persistent Connection ########################## events { worker_connections 1024; } http { upstream…
Read more


November 23, 2017 0

Logstash

# Source the following file to setup the java version correctly source ~/sourceme (to setup the java version correctly) # Logstash to try from command line logstash -e 'input { stdin { } } output { stdout {} }' # Logstash to try from command line logstash -e 'input { stdin { } } output…
Read more


November 22, 2017 0

Elasticsearch Queries

DELETE /govtcompany DELETE /company* DELETE /test* DELETE /myindex* ### Run from your terminal ## it tells if elasticsearch is up or not ### GET / ### Create Index PUT /govtcompany ### Get Status GET /govtcompany1?pretty ### Get List of Indices GET /_cat/indices?pretty&v GET /_cat/indices/com*?v&s=index ### Delete and Index- DELETE /govtcompany GET /_cat/indices?pretty ### Create index…
Read more


November 22, 2017 0

Synopsys

GET _search { “query”: { “match_all”: {} } } POST /_aliases { “actions”: [ { “add”: { “index”: “myindex”, “alias”: “alias1” } } ] } DELETE /test1 PUT /test1 { “mappings”: { “type1”: { “properties”: { “user”: { “type”: “keyword” } } } } } POST /test1/type1 { “user”: “Amar Sharma1”, “age”: 45, “experience”: 10…
Read more


November 20, 2017 0

Python Map Reduce Program

Mapper.py #!/usr/bin/env python import sys for line in sys.stdin:   line = line.strip()   words = line.split() for word in words:   print ‘%s\t%s’ % (word, 1) Reducer.py #!/usr/bin/env python from operator import itemgetter import sys current_word = None current_count = 0 word = None # input comes from STDIN for line in sys.stdin:  …
Read more


November 19, 2017 0

Python Exercise 3

——-> file name hello.py def foo(): print “Hello Amar Sharma” if __name__ == “__main__”: foo() Exercise: Take the following list, nlis, and compute its average. That is, write a function ‘average(numlis)’ that uses a ‘for’ loop to sum up the numbers in numlis and divide by the length of numlis. Just to be sure that…
Read more


October 19, 2017 0

Python Exercise 2

——> file name hello.py def foo(): print “Hello Amar Sharma” if __name__ == “__main__”: foo() Exercise- Using List Comprehension get the list of vowels in word “INDIAN”. ——————-sample—————————- # Python Module example def add(a, b): “””This program adds two numbers and return the result””” result = a + b return result Exercise – Make a…
Read more


October 19, 2017 1

Python Exercise 1

  —————– sample ———————– def hello(): “”” prints hello, world “”” print “Hello, world!” def areacircle(radius): “”” Computes the area of a circle of the given radius “”” area = 3.14*radius**2 print “The area of a circle of radius”,radius,”is”, area “”” Exercise: Write a function ‘def areatriangle(b,h)’ to compute the area of a triangle: formula…
Read more


October 19, 2017 1

Python

Exercises at – Python Exercise 1 Python Exercise 2 Python Exercise 3 —-> hello.py import re def foo(): print(“Hello Amar Sharma”) if __name__ == “__main__”: foo() TRY FROM REPL Strings examples >>> name1 = “John” >>> name2 = “Doe” >>> “My name is %s ” % name1 ‘My name is John ‘ >>> name1 +…
Read more


October 18, 2017 0

WOIR is Hiring Interns/Trainees from Ist Week of Oct, 2017

WOIR Software is looking for interns/trainees (one or two) for a period of approx. 2-3 months. The position is based in Hyderabad (near Hitex City). It has to be full time – starting from 1st week of October 2017. The work will include coding in python, shell, web based application and Big Data, NoSQL. He/she…
Read more


October 1, 2017 0