Skip to content

Instantly share code, notes, and snippets.

View ShabbirHasan1's full-sized avatar
:octocat:
Building Things

Shabbir Hasan ShabbirHasan1

:octocat:
Building Things
  • India
View GitHub Profile
{
"info": {
"_postman_id": "628c6320-6b30-4c04-9945-7de283730c26",
"name": "Upstox Developer API",
"description": "Build your App on the Upstox platform\n\n<img src=\"/developer/api-documentation/images/brokerage_free_banner.png\" alt=\"Banner\">\n\n<a href=\"https://marketing-creative-and-docs.s3.ap-south-1.amazonaws.com/API_T%26C/T%26C+apply.pdf\">\\* Terms and Conditions</a>\n\n<h2>Introduction</h2>\n\nUpstox API is a set of rest APIs that provide data required to build a complete investment and trading platform. Execute orders in real time, manage user portfolio, stream live market data (using Websocket), and more, with the easy to understand API collection.\n\nAll requests are over HTTPS and the requests are sent with the content-type β€˜application/json’. Developers have the option of choosing the response type as JSON or CSV for a few API calls.\n\nTo be able to use these APIs you need to create an App in the Developer Console and generate your **apiKey** and **apiSecret**. You can use a redirect
@ShabbirHasan1
ShabbirHasan1 / async_kiteext_ticker.py
Created September 14, 2024 09:23 — forked from MooneDrJune/async_kiteext_ticker.py
KiteConnect Extras Async KiteConnect Ticker
from __future__ import annotations
from asyncio.exceptions import CancelledError
from typing import (
Any,
Callable,
Dict,
List,
Literal,
Optional,
NoReturn,
@ShabbirHasan1
ShabbirHasan1 / kiteconnect_extras.py
Created September 14, 2024 09:22 — forked from MooneDrJune/kiteconnect_extras.py
KiteConnect Extras Async KiteConnect
from __future__ import annotations
# -*- coding: utf-8 -*-
"""
:description: KiteConnect (Batteries Included) On Steroids Version.
:license: MIT.
:author: Dr June Moone
:created: On Saturday July 29, 2023 19:56:53 GMT+05:30
"""
__author__ = "Dr June Moone"
__webpage__ = "https://github.com/MooneDrJune"
@ShabbirHasan1
ShabbirHasan1 / OpenBSD_on_Apple_M2_QEMU.md
Created September 9, 2024 16:08 — forked from astreknet/OpenBSD_on_Apple_M2_QEMU.md
OpenBSD on Apple M2 with QEMU

OpenBSD on Apple M2 with QEMU

Minimalist installation of OpenBSD on the Apple M2 using QEMU

Ingredients

Installation

  1. install QEMU with Homebrew brew install qemu, also possible with MacPorts
  2. Write a script with execute permissions chmod +x qemu_aarch64_install_openbsd.sh for installing the image.
@ShabbirHasan1
ShabbirHasan1 / clickhouse_install.sh
Created September 6, 2024 16:50 — forked from githubdebugger/clickhouse_install.sh
clickhouse_install.sh
#!/bin/bash
# Function to prompt user for yes/no input
ask_yes_no() {
while true; do
read -p "$1 (y/n): " yn
case $yn in
[Yy]* ) return 0;;
[Nn]* ) return 1;;
* ) echo "Please answer yes or no.";;

Refactoring Kind's switch with ChatSH

(This is a readable version of my ChatSH session. For the full log, click here.)

Taelin: Hello. We're going to refactor an aspect of the implementation of the Kind language. Are you ready? Start by doing 'ls', then 'cat kind-lang.cabal' to get familiar with the repo.

ChatSH: Certainly! I'm ready to help you refactor an aspect of the Kind language implementation. Let's start by examining the repository structure and the contents of the Cabal file.

ls &amp;&amp; echo "---" &amp;&amp; cat kind-lang.cabal
@ShabbirHasan1
ShabbirHasan1 / x2522.20240813.log
Created August 26, 2024 18:23 — forked from databento-bot/x2522.20240813.log
X2522 benchmark, 2024-08-13
# One-way, overall
#
# 0.973/1.093/3.042us (0/50/99p, 256 byte packets)
# Port-to-port (switch hop)
#
# 680+/-20ns
#
# - Mellanox Spectrum SN2700 w/ Cumulus 5.7
@ShabbirHasan1
ShabbirHasan1 / add_to_zshrc.sh
Created August 25, 2024 21:09 — forked from karpathy/add_to_zshrc.sh
Git Commit Message AI
# -----------------------------------------------------------------------------
# AI-powered Git Commit Function
# Copy paste this gist into your ~/.bashrc or ~/.zshrc to gain the `gcm` command. It:
# 1) gets the current staged changed diff
# 2) sends them to an LLM to write the git commit message
# 3) allows you to easily accept, edit, regenerate, cancel
# But - just read and edit the code however you like
# the `llm` CLI util is awesome, can get it here: https://llm.datasette.io/en/stable/
gcm() {
fn marine_line() -> String {
use rand::{seq::SliceRandom, Rng};
let marine_life = ["🐳", "🐠", "🦈", "πŸ™", "🐑", "🐬", "🐟", "πŸ¦€", "πŸ‹"];
let water = [
"\x1B[38;2;0;100;200mβ‰ˆ\x1B[0m",
"\x1B[38;2;10;110;210mβ‰ˆ\x1B[0m",
"\x1B[38;2;20;120;220mβ‰ˆ\x1B[0m",
"\x1B[38;2;30;130;230mβ‰ˆ\x1B[0m",
"\x1B[38;2;40;140;240mβ‰ˆ\x1B[0m",
# CODE TO CALCULATE THE SPREAD AT A GIVEN DEPTH ON ALL CCXT EXCHANGES
# CREDIT TO @stalequant
# Python code by https://x.com/PythonLearnGang he is happy to help troubleshoot errors
import asyncio
import ccxt.pro
import matplotlib.pyplot as plt
import nest_asyncio
import numpy as np