Skip to content

Instantly share code, notes, and snippets.

View pravj's full-sized avatar
📖

Pravendra Singh pravj

📖
View GitHub Profile
@mdisec
mdisec / gist:b0d44cc14e4c4c10cd64
Last active February 10, 2023 21:59
Kibana with Nginx Reverse Proxy + SSL + HTTP Auth
# Nginx proxy for Elasticsearch + Kibana
#
# In this setup, we are password protecting the saving of dashboards. You may
# wish to extend the password protection to all paths.
#
# Even though these paths are being called as the result of an ajax request, the
# browser will prompt for a username/password on the first request
#
# If you use this, you'll want to point config.js at http://FQDN:443/ instead of
# http://FQDN:9200
@drorata
drorata / gist:146ce50807d16fd4a6aa
Last active May 23, 2024 02:48
Minimal Working example of Elasticsearch scrolling using Python client
# Initialize the scroll
page = es.search(
index = 'yourIndex',
doc_type = 'yourType',
scroll = '2m',
search_type = 'scan',
size = 1000,
body = {
# Your query's body
})
@sebsto
sebsto / gist:19b99f1fa1f32cae5d00
Created August 8, 2014 15:53
Install Maven with Yum on Amazon Linux
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
mvn --version
@staltz
staltz / introrx.md
Last active May 23, 2024 20:07
The introduction to Reactive Programming you've been missing
@gitaarik
gitaarik / git_submodules.md
Last active May 21, 2024 13:46
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@debasishg
debasishg / gist:8172796
Last active May 10, 2024 13:37
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&rep=rep1&t
@jmduke
jmduke / bigTech.py
Created November 24, 2013 01:56
Grab data from various organizations from Github.
import requests
import operator
companies = ["facebook", "aws", "google", "yahoo", "dropbox", "twitter", "paypal", "linkedin", "mozilla", "adobe"]
api_url = "https://api.github.com/orgs/{}/repos"
data = {}
for company in companies:
data[company] = {'forks': 0, 'stars': 0, 'repos': 0, 'languages': {}}
r = requests.get(api_url.format(company))
@karmi
karmi / .gitignore
Last active December 24, 2015 03:49
Hello, Elasticsearch in Ruby
tmp/
@iandanforth
iandanforth / kmeansExample.py
Last active May 13, 2024 14:00
A pure python implementation of K-Means clustering. Optional cluster visualization using plot.ly.
#############################################################################
# Full Imports
from __future__ import division
import math
import random
"""
This is a pure Python implementation of the K-means Clustering algorithmn. The
original can be found here:
@captn3m0
captn3m0 / 00-port-list.txt
Last active December 16, 2015 14:39
List of outgoing ports opened in the IIT-R campus
21
22
53
80
81
110
161
162
210
443