Skip to content

Instantly share code, notes, and snippets.

View arulrajnet's full-sized avatar

Arul arulrajnet

View GitHub Profile
@arulrajnet
arulrajnet / ChromeAppDownloader.py
Last active February 15, 2024 01:06
Python Script to download the Chrome Extensions (CRX) file directly from the google chrome web store.
# -*- coding: utf-8 -*-
"""
Python Script to download the Chrome Extensions (CRX) file directly from the google chrome web store.
Referred from http://chrome-extension-downloader.com/how-does-it-work.php
"""
from __future__ import division
import argparse
import requests
@arulrajnet
arulrajnet / apkdl.sh
Last active December 13, 2023 20:33
Script to download apk file from Google Play a.k.a Android Market.
#!/bin/bash
#
# Script to download apk file from Google Play a.k.a Android Market.
# Accepts package name or Google Play URL as input.
# Files are download from apk-dl.com
# author : Arul (@arulrajnet)
#
APK_DL_URL="http://apk-dl.com/store/apps/details?id=%s"
PACKAGE_NAME=""
@arulrajnet
arulrajnet / MXEmailVerifier.py
Last active May 25, 2023 14:23
Verify the given mail id is valid or not, without sending mail. Verifying the email id directly from mail exchange server.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Verify the given mail id is valid or not without sending mail. Verifying the email id directly from mail exchange server.
"""
import argparse
import smtplib
import dns.resolver
@arulrajnet
arulrajnet / colors.py
Last active January 2, 2023 04:45 — forked from jossef/colors.py
python coloring for linux, based on this answer http://stackoverflow.com/a/26445590/3191896 and modified to make it more usable in a pythonic way.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
class Color(object):
"""
reference from https://gist.github.com/Jossef/0ee20314577925b4027f and modified bit.
"""
def __init__(self, text, **user_styles):
@arulrajnet
arulrajnet / stockmarketindia.py
Last active December 29, 2022 17:56
Get the latest Index from BSE and NSE stock market. Python script using google finance open API http://finance.google.com/finance/info?client=ig&q=INDEXBOM:SENSEX
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from collections import namedtuple
import json
try:
from urllib.request import Request, urlopen
except ImportError: # python 2
from urllib2 import Request, urlopen
@arulrajnet
arulrajnet / http10server.py
Last active September 1, 2022 00:44
HTTP 1.0 upstream device for nginx proxy testing.
#!/usr/bin/env python3
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
from functools import partial
from http.server import HTTPServer, SimpleHTTPRequestHandler
import os
import sys
def log(*value, sep=' ', end='\n', file=sys.stdout, flush=False):
print(*value, sep=sep, end=end, file=file, flush=flush)
@arulrajnet
arulrajnet / flask_tracing_request_id.py
Created September 10, 2021 15:05
Handling "X-Request-ID" tracing in flask with logger
#! /usr/bin/env python3
from flask import Flask, request
# Need python 3.7+
from contextvars import ContextVar
import logging
request_id_context = ContextVar("request_id")
# Flask app
app = Flask(__name__)
@arulrajnet
arulrajnet / namespace-hirearchy.js
Last active August 23, 2022 01:44
Build a tree based on namespace
let listOfCategories = [
{
"id": 4,
"name": "JavaScript",
"namespace": "/1/2"
},
{
"id": 1,
"name": "Development",
"namespace": "/"
@arulrajnet
arulrajnet / TamilStopWords.txt
Created December 20, 2021 15:03
Tamil language stop words
அங்கு
அங்கே
அடுத்த
அதற்கு
அதனால்
அதன்
அதிக
அதில்
அது
அதே
@arulrajnet
arulrajnet / WhoHasLatestNav.py
Created May 1, 2015 10:22
Have curiosity to know how www.valueresearchonline.com updated their NAV value of a fund once the Market closed on 4:10PM every day. So I wrote a script to check the NAV value in Value Research, AMFI and Morningstar for a particular fund. Here that script...
# -*- coding: utf-8 -*-
__author__ = 'arul'
import requests, sys
from lxml import html
from bs4 import BeautifulSoup
vrs_value = "NA"
amfi_value = "NA"