Instructions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# USE_NGROK=True uvicorn server:app | |
import os | |
import sys | |
from fastapi import FastAPI | |
from fastapi.logger import logger | |
from pydantic import BaseSettings | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. |
#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");
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |