Skip to content

Instantly share code, notes, and snippets.

View harshtikuu's full-sized avatar
❄️
Hey there!

Harsh Tiku harshtikuu

❄️
Hey there!
View GitHub Profile
@harshtikuu
harshtikuu / oauth.txt
Created April 8, 2026 08:28
OAuth Flow Mermaid
sequenceDiagram
autonumber
participant Dev as Developer
participant AS as Auth Server (Google)
participant App as App Server
participant U as User (Browser)
Note over Dev, AS: [ Provisioning Phase ]
Dev->>AS: Register App (Name, Redirect URIs, Scopes)
AS-->>Dev: Issue Client ID & Client Secret
@harshtikuu
harshtikuu / sortedcontainers.py
Created March 22, 2021 18:27
Writing Sorted Containers in Python
from sortedcontainers import SortedList,SortedDict
class TreeItem:
def __init__(self, name:str):
self.name = name
def __lt__(self, other):
if not isinstance(other,TreeItem):
raise NotImplemented
return len(self.name)<len(other.name)
@harshtikuu
harshtikuu / attention.py
Created May 20, 2019 09:46
Attention layer for keras
import tensorflow as tf
from tensorflow.keras import layers,Sequential
from tensorflow.keras.preprocessing import sequence
class Attention(layers.Layer):
def __init__(self,**kwargs):
super().__init__(**kwargs)
self.dense = layers.Dense(30,activation='relu')
self.attention_values = layers.Dense(1)