Skip to content

Instantly share code, notes, and snippets.

View faizankshaikh's full-sized avatar

jalFaizy faizankshaikh

View GitHub Profile
@faizankshaikh
faizankshaikh / privategpt_for_quantumcomputing.ipynb
Created August 31, 2023 10:36
privateGPT_for_QuantumComputing.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@faizankshaikh
faizankshaikh / fora.ipynb
Last active March 16, 2023 13:33
fora with threat
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@faizankshaikh
faizankshaikh / KLD_Gaussian.ipynb
Last active November 20, 2021 20:27
Deriving KL Divergence for two gaussian distributions
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@faizankshaikh
faizankshaikh / 1_init_func.py
Last active November 19, 2020 07:57
typing_tutor_article_code
class TypingTutor:
def __init__(self):
st.set_page_config(page_title="Typing Tutor", layout="wide")
st.markdown(
"<h1 style='text-align: center; color: black;'>Typing Tutor</h1>",
unsafe_allow_html=True,
)
class Solution:
def __init__(self):
self.sum_val = 0
def _checker(self, root: TreeNode, direction: str):
if root:
self._checker(root.left, "left")
if not root.left and not root.right and direction == "left":
# print("Adding", root.val, "to", self.sum_val)
@faizankshaikh
faizankshaikh / play2048.ipynb
Created July 28, 2020 09:14
play2048.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@faizankshaikh
faizankshaikh / advanced-python-concepts-using-a-use-case-of-simple-nn.ipynb
Created July 26, 2020 12:21
Advanced Python concepts using a use case of simple NN.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@faizankshaikh
faizankshaikh / article_cell_0.py
Last active December 23, 2022 10:33
code for NN from scratch simplified
# importing required libraries
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
import json
file_name = r"3. Pytorch from Scratch (Part I).ipynb" # enter your own filename
with open(file_name, 'r') as f:
lines = f.readlines()
ipynb = json.loads("".join(lines))
code_cells = [cell['source'] for cell in ipynb['cells'] if cell['cell_type'] == 'code']
string = e3y.__str__()
print("Start simplification\n")
print(string, " # Original string")
string = re.sub(r"0\*\w", r"0", string)
print(string, " # simplify 0*A -> 0")
string = re.sub(r"\w\*0", r"0", string)
print(string, " # simplify A*0 -> 0")
string = re.sub(r"1\*(\w)", r"\1", string)
print(string, " # simplify 1*A -> A ")