Skip to content

Instantly share code, notes, and snippets.

View dubeyji10's full-sized avatar
💭
Cogito, ergo sum

Abhishek Dubey dubeyji10

💭
Cogito, ergo sum
View GitHub Profile
@dubeyji10
dubeyji10 / elasticsearch_index_doc.ipynb
Created June 18, 2022 12:57
working with elasticsearch python api
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dubeyji10
dubeyji10 / index_gita_in_es.ipynb
Created June 18, 2022 06:52 — forked from achinta/index_gita_in_es.ipynb
Elastic Search functions
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dubeyji10
dubeyji10 / simpleCSV_input.conf
Last active June 18, 2022 05:40
logstash used to input csv file to elasticsearch index
input {
file {
path => "/home/abhishek/Documents/logstash_use/walmart_cleaned_2.csv"
start_position => "beginning"
}
}
filter {
csv{
separator => ","
@dubeyji10
dubeyji10 / kibana.sh
Created June 15, 2022 13:30
a bash script to launch an instance of gnome-terminal with some pre written commands
echo "starting kibana"
gnome-terminal --tab --title="kibana" --command="bash -c 'cd;cd /home/abhishek/Downloads/kibana-7.17.4-linux-x86_64;echo running kibana in second tab; $SHELL'"
@dubeyji10
dubeyji10 / conversation_pushWithrefreshTokens.py
Created June 7, 2022 13:43
conversation push with a refresh token function - since conversation payload count is very high - refreshing of access tokens is needed
'''
running a refresh thread in background
'''
import threading
import logging
import os
import logging
@dubeyji10
dubeyji10 / clientsPush_index401.py
Created June 7, 2022 12:39
connection lost at index 400 restarted api requests at index 401
'''
push clients with refresh tokens function
'''
import os
import logging
import time
from datetime import datetime , timedelta
@dubeyji10
dubeyji10 / conversation_json_Dumps.py
Created June 6, 2022 11:56
conversation table json dumps of 100 records in each json collection
# invoice info - 19,424
print('iterate with index - steps of 100')
import mysql.connector
from mysql.connector import Error
import logging
import re
import time
from datetime import datetime , timedelta
@dubeyji10
dubeyji10 / invoiceInfo_json_Dumps.py
Created June 6, 2022 11:30
invoice info json dumps records of 100
# invoice info - 19,424
print('iterate with index - steps of 100')
import mysql.connector
from mysql.connector import Error
import logging
import re
import time
from datetime import datetime , timedelta
@dubeyji10
dubeyji10 / invoiceItems_jsonDump_shards.py
Created June 6, 2022 11:01
invoice items split of 100 records limit with varying offset - json dumps
print('iterate with index - steps of 100')
import mysql.connector
from mysql.connector import Error
import logging
import re
import time
from datetime import datetime , timedelta
import json