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
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 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<script src="https://d3js.org/d3.v4.min.js"></script> | |
<style id="jsbin-css"> | |
.line { | |
fill: none; |
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
from smtplib import SMTP # Use this for standard SMTP protocol (port 25, no encryption) | |
# from smtplib import SMTP_SSL as SMTP # This invokes the secure SMTP protocol (port 465, uses SSL) | |
from email.mime.text import MIMEText | |
class Email(object): | |
SMTP_CONFIG = dict( | |
server="your_smtp_server_hostname", | |
username="your_smtp_server_username", | |
password="your_smtp_server_password" |
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
DataTable.ext.buttons.json = { | |
bom: false, | |
className: 'buttons-json buttons-jsonhtml5', | |
available: function () { | |
return window.FileReader !== undefined && window.Blob; | |
}, | |
text: function ( dt ) { | |
return 'JSON'; | |
}, | |
action: function ( e, dt, button, config ) { |
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
log_format timed_combined '$remote_addr - $remote_user [$time_local] ' | |
'"$request" $status $body_bytes_sent ' | |
'"$http_referer" "$http_user_agent" ' | |
'$request_time $upstream_response_time $pipe'; |
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 string | |
import random | |
def random_string(size): | |
"""Generate a random string from a given length""" | |
return "".join(random.SystemRandom() | |
.choice(string.ascii_lowercase + string.digits) for _ in range(size)) |
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)) |
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
[gitflow "branch"] | |
master = production | |
develop = develop | |
[gitflow "prefix"] | |
feature = feature- | |
release = release- | |
hotfix = hotfix- | |
support = support- | |
versiontag = v |