Skip to content

Instantly share code, notes, and snippets.

View raaghulr's full-sized avatar

Raaghul R raaghulr

View GitHub Profile
@raaghulr
raaghulr / sources.list
Created February 1, 2022 09:19 — forked from ishad0w/sources.list
Ubuntu 20.04 LTS (Focal Fossa) -- Full sources.list
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
@raaghulr
raaghulr / kitetickersample.html
Created December 25, 2021 13:32 — forked from ajinasokan/kitetickersample.html
Kite Ticker Pure JS Example
<script src="ticker.js"></script>
<script>
var ticker = new KiteTicker({api_key: "api_key", access_token: "access_token"});
ticker.connect();
ticker.on("ticks", onTicks);
ticker.on("connect", subscribe);
function onTicks(ticks) {
@raaghulr
raaghulr / README.md
Created May 19, 2021 06:44 — forked from vividvilla/README.md
Kite connect Python ticker save to database example

Instructions

# USE_NGROK=True uvicorn server:app
import os
import sys
from fastapi import FastAPI
from fastapi.logger import logger
from pydantic import BaseSettings
@raaghulr
raaghulr / gmail_imap_example.py
Created March 8, 2021 13:03 — forked from robulouski/gmail_imap_example.py
Very basic example of using Python and IMAP to iterate over emails in a gmail folder/label. http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/
#!/usr/bin/env python
#
# Very basic example of using Python and IMAP to iterate over emails in a
# gmail folder/label. This code is released into the public domain.
#
# RKI July 2013
# http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/
#
import sys
import imaplib
#!/usr/bin/perl
#
# http://www.voidynullness.net/blog/2012/03/03/generate-amibroker-watchlist-indexes-from-spreadsheet/
#
use strict;
use warnings;
use Spreadsheet::ParseExcel;
#
# Check and extract command line arguments -- or setup OS-specific defaults.
@raaghulr
raaghulr / EOD-Data.md
Created March 8, 2021 05:58 — forked from smnuman/EOD-Data.md
Data Export to a .csv file from AmiBroker database.

#EOD-Data export script Tomasz Janeczko described -- in AmiBroker kb -- a simple way to export AB data to a .csv file.

The easiest way to export quotes to CSV file is to use the below formula from Automatic Analysis window: (Analysis -> Automatic Analysis)

Filter=1; 
AddColumn(O,"Open"); 
AddColumn(H,"High"); 
AddColumn(L,"Low"); 
@raaghulr
raaghulr / kiteconnect_flask.py
Created February 27, 2021 15:12 — forked from vividvilla/kiteconnect_flask.py
Kite Connect Python Flask Example
import json
from flask import Flask, request
from kiteconnect import KiteConnect
# Base settings
PORT = 5010
HOST = "127.0.0.1"
# Kite Connect App settings. Go to https://developers.kite.trade/apps/
# to create an app if you don't have one.
@raaghulr
raaghulr / pykiteconnect_streaming_threaded.py
Created February 27, 2021 15:11 — forked from vividvilla/pykiteconnect_streaming_threaded.py
Test Kite Connect data streaming with threaded Raw
import time
import logging
from kiteconnect import WebSocket
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
# Initialise.
kws = WebSocket("api_key", "public_token", "zerodha_user_id")
# RELIANCE BSE and RELIANCE NSE
@raaghulr
raaghulr / test_streaming.py
Created February 27, 2021 15:08 — forked from vividvilla/test_streaming.py
Kite Connect Python client websocket streaming example - https://github.com/rainmattertech/pykiteconnect
import logging
from kiteconnect import WebSocket
logging.basicConfig(filename='ticks.log', level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
# Initialise.
kws = WebSocket("api_key", "public_token", "user_id")
tokens = [5215745, 633601, 1195009, 779521, 758529, 1256193, 194561, 1837825, 952577, 1723649, 3930881, 4451329, 593665, 3431425, 2905857, 3771393, 3789569, 3463169, 381697, 54273, 415745, 2933761, 3580417, 49409, 3060993, 4464129, 3375873, 4574465, 636673, 3721473, 2796801]
print("Tokens length", len(tokens))