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 uuid, re | |
print(':'.join(re.findall('..', '%012x' % uuid.getnode()))) |
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 | |
import os | |
import sys | |
import shutil | |
import sysconfig | |
import winreg | |
from win32com.client import Dispatch | |
def get_reg(name,path): | |
# Read variable from Windows Registry |
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
date | open | high | low | close | |
---|---|---|---|---|---|
09-09-2022 09:15 | 40601.15 | 40611.15 | 40601.15 | 40611.15 | |
09-09-2022 09:15 | 40601.15 | 40601.15 | 40591.15 | 40591.15 | |
09-09-2022 09:15 | 40591.15 | 40591.15 | 40581.15 | 40581.15 | |
09-09-2022 09:15 | 40581.15 | 40581.15 | 40571.15 | 40571.15 | |
09-09-2022 09:15 | 40571.15 | 40571.15 | 40561.15 | 40561.15 | |
09-09-2022 09:15 | 40571.15 | 40581.15 | 40571.15 | 40581.15 | |
09-09-2022 09:15 | 40581.15 | 40591.15 | 40581.15 | 40591.15 | |
09-09-2022 09:15 | 40591.15 | 40601.15 | 40591.15 | 40601.15 | |
09-09-2022 09:15 | 40601.15 | 40611.15 | 40601.15 | 40611.15 |
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
# -*- coding: utf-8 -*- | |
""" | |
:description: A Blazingly Fast Custom Class To Fetch Instruments Token, Symbols, Expiries, LTP Etc. from KiteConnect. | |
:license: MIT. | |
:author: Dr June Moone | |
:created: On Monday September 26, 2022 11:17:53 GMT+05:30 | |
""" | |
__author__ = "Dr June Moone" | |
__webpage__ = "https://github.com/MooneDrJune" | |
__license__ = "MIT" |
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 datetime | |
import enum | |
import json | |
import logging | |
import random | |
import re | |
import string | |
import pandas as pd | |
from websocket import create_connection | |
import requests |
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, pyotp, kiteconnect.exceptions as ex | |
from kiteconnect import KiteConnect | |
logging.basicConfig(level=logging.DEBUG) | |
log = logging.getLogger(__name__) | |
class Kite(KiteConnect): | |
KITE_API_DEV_LOGIN = "https://kite.trade/connect/login" |
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 __future__ import annotations | |
import re, pandas as pd | |
from typing import Dict | |
from functools import lru_cache | |
from datetime import date, datetime as dt | |
DERIVATIVES_TRADINGSYMBOL_META = re.compile( | |
"(?P<instrument>[A-Z]+)(?P<expiry>[A-Z0-9]{5})(?P<instrument_type>[A-Z0-9.]+)" | |
) | |
OND_MAP = {"O": "Oct", "N": "Nov", "D": "Dec"} |
We can't make this file beautiful and searchable because it's too large.
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
Timestamp,Open,High,Low,Close,Volume,OI | |
2024-02-07 15:29:58,45916.4,45916.4,45916.4,45916.4,0,0 | |
2024-02-08 09:15:00,45970.15,45980.35,45970.15,45980.35,0,0 | |
2024-02-08 09:15:01,46006.05,46006.05,45977.75,45977.75,0,0 | |
2024-02-08 09:15:02,46026.1,46026.1,46011.7,46011.7,0,0 | |
2024-02-08 09:15:04,46016.5,46016.5,46016.5,46016.5,0,0 | |
2024-02-08 09:15:05,46027.7,46027.7,46022.05,46022.05,0,0 | |
2024-02-08 09:15:07,46028.05,46028.05,46009.25,46009.25,0,0 | |
2024-02-08 09:15:08,46025.75,46025.75,46025.75,46025.75,0,0 | |
2024-02-08 09:15:09,46004.85,46004.85,46004.85,46004.85,0,0 |
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
<?php | |
// use to generate key : 'openssl rand -hex 32' | |
function my_encrypt($data, $passphrase) { | |
$secret_key = hex2bin($passphrase); | |
$iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc')); | |
$encrypted_64 = openssl_encrypt($data, 'aes-256-cbc', $secret_key, 0, $iv); | |
$iv_64 = base64_encode($iv); | |
$json = new stdClass(); | |
$json->iv = $iv_64; |
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 Crypto.Cipher import AES | |
from Crypto.Util import Padding | |
from hashlib import md5 | |
from base64 import b64encode, b64decode | |
import sys | |
passphrase = sys.argv[1] | |
content = sys.argv[2] | |
print(passphrase, content) |
OlderNewer