Skip to content

Instantly share code, notes, and snippets.

View apanimesh061's full-sized avatar
💭
I may be slow to respond.

Animesh Pandey apanimesh061

💭
I may be slow to respond.
View GitHub Profile
@apanimesh061
apanimesh061 / CrawlStreetView.py
Created July 10, 2017 01:49
Generate Random Addresses
# coding=utf-8
"""
This script crawls the street-view web-page and collects all
of the states, counties per state, cities in every county and
streets in every city.
I created a separate script that generates an apartment number
as per three formats. See GetRandomAddress.py
"""
@apanimesh061
apanimesh061 / napa-on-docker.md
Last active October 15, 2016 07:30
Installing napa on Docker

apt-get update

apt-get install gcc g++ ruby ruby2.3-dev git vim tmux

gem install bundler

apt-get install zlib1g-dev libxml2 make

apt-get install mysql-server libmysqlclient-dev

@apanimesh061
apanimesh061 / docker.md
Last active May 24, 2018 17:12
Creating a commit of a Docker Container

Lets create a docker-machine first. Here I have named my machine docker-ubuntu with 2 GB RAM and 2 CPUs.

$ docker-machine.exe create -d virtualbox --virtualbox-memory "2048" --virtualbox-cpu-count "2" docker-ubuntu
Running pre-create checks...
Creating machine...
(docker-ubuntu) Copying C:\Users\Animesh\.docker\machine\cache\boot2docker.iso to C:\Users\Animesh\.docker\machine\machines\docker-ubuntu\boot2docker.iso...
(docker-ubuntu) Creating VirtualBox VM...
(docker-ubuntu) Creating SSH key...
(docker-ubuntu) Starting the VM...

(docker-ubuntu) Check network to re-create if needed...

@apanimesh061
apanimesh061 / output.json
Created June 3, 2016 14:58
Profile API output
{
"took": 116727,
"timed_out": false,
"_shards": {
"total": 24,
"successful": 24,
"failed": 0
},
"hits": {
"total": 265076,
- hosts: all
sudo: true
roles:
- Stouts.mongodb
vars:
- mongodb_conf_replSet: rs0
- mongodb_conf_bind_ip: 192.168.111.11
- mongodb_shell:
rs.initiate()
@apanimesh061
apanimesh061 / a_mongo-connector_tutorial.md
Last active May 26, 2018 11:40
mongo-connector with ES 2.2.0 and Mongo 2.6

Before starting please have a mongo replica set initiated. I have mongo running at localhost:27170 and elasticsearch at localhost:9200

The test dataset I used is available on the mongodb website.

I am using MongoDB 2.6 and Elasticsearch 2.2.0 on a Windows machine.

Here I have tested three cases:

  • An index already exists, mc-test-index in this case