Skip to content

Instantly share code, notes, and snippets.

View mkhuzaima's full-sized avatar
🎯
Focusing

Muhammad Khuzaima Umair mkhuzaima

🎯
Focusing
View GitHub Profile

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@mkhuzaima
mkhuzaima / Overleaf-Paste-Script.js
Last active March 22, 2023 14:09
Paste image from clipboard without need of uplaoding file using ctrl + v. The code has been copied from https://greasyfork.org/en/scripts/461190-overleaf-paste-images-from-clipboard . I created this gist because the file was not accessible in some regions.
// ==UserScript==
// @name Overleaf - Paste Images from Clipboard
// @namespace https://github.com/BLumbye/overleaf-userscripts
// @version 0.6
// @description Paste images from your clipboard directly into Overleaf (Community Edition, Cloud and Pro)
// @author Sebastian Haas, Benjamin Lumbye
// @license GPL-3
// @match https://www.overleaf.com/project/*
// @require https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/crypto-js.js
// @grant none
@mkhuzaima
mkhuzaima / corrected.json
Created June 6, 2022 23:49
Stack Overflow json corrected
{
"core": {
"dry_run": false,
"rclone_binary_path": "/usr/bin/rclone",
"rclone_config_path": "/home/smurf/.config/rclone/rclone.conf"
},
"hidden": {
"/mnt/local/.unionfs-fuse": {
"hidden_remotes": [
"td-02",
@mkhuzaima
mkhuzaima / GitCommitEmoji.md
Created June 6, 2022 19:24 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@mkhuzaima
mkhuzaima / MergeSort.py
Created September 27, 2021 16:40
Python code for merge sort algorithm for sorting n numbers. The running time of this algorithm is: O(n . lg(n) )
def merge(arr, start, middle, end):
i = j = 0
k = start
left = arr[start:middle]
right = arr[middle:end]
while i < len(left) and j < len(right):
if left[i] < right[j]:
arr[k] = left[i]
i += 1
@mkhuzaima
mkhuzaima / karatsuba.py
Created September 27, 2021 14:28
This gist contains the famous algorithm "karatsuba" in python which is used to efficiently multiply two numbers.
def multiply(x, y):
n = len(str(x))
if n == 1:
return x * y
nby2 = n // 2
ten_to_nby2 = 10 ** nby2
a = x // ten_to_nby2
b = x % ten_to_nby2
c = y // ten_to_nby2
@mkhuzaima
mkhuzaima / Scraping.py
Last active July 5, 2022 03:51
Python Scraping
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from bs4 import BeautifulSoup
import pandas
from random import randint
from time import sleep
options = Options()