Setting up ElasticSearch with MongoDB
- https://coderwall.com/p/sy1qcw
- elasticsearch mongoDB
Setting up ElasticSearch with MongoDB
| #!/usr/bin/env bash | |
| # bash script to generate tree structure of a directory | |
| # Pravendra Singh (@hackpravj) | |
| pwd=$(pwd) | |
| find $pwd -print | sed -e "s;$pwd;\.;g;s;[^/]*\/;|__;g;s;__|; |;g" |
| var i = 99 | |
| while i > 0 | |
| println(i + " bottles of beer on the wall, " + i + "bottles of beer.") | |
| var num = i - 1 | |
| if i == 1 { | |
| var num = "no more" | |
| } | |
| println("Take one down and pass it around, " + num + "bottles of beer on the wall.") | |
| println("No more bottles of beer on the wall, no more bottles of beer.") | |
| println("Go to the store and buy some more, 99 bottles of beer on the wall.") |
| # Description: | |
| # partychat like chat-score/leaderboard script built at 'SDSLabs' | |
| # we developed this to use in our 'Slack' team instance | |
| # | |
| # Commands: | |
| # listen for keyword++ or keyword-- in chat text and updates score for each | |
| # bot score keyword : returns current score of 'keyword' | |
| # | |
| # Examples: | |
| # : will update score for each, accordingly : |
There is a sub-section named "Paging"[1] in the "Data API" section. It explains the Metadata in API responses, so I used this for my answer here.
I used Python's "requests" to communicate with the sandbox API. Below, I'm adding the "paging" response I got for both the endpoints, "students" and "sections".
Students {u'current': 1, u'count': 1004, u'total': 11}
Sections