Skip to content

Instantly share code, notes, and snippets.

View hasnainr's full-sized avatar
🎯
Focusing

hasnainr

🎯
Focusing
View GitHub Profile
@hasnainr
hasnainr / docx2md.md
Created June 7, 2020 08:27 — forked from aembleton/docx2md.md
Convert a Word Document into MD

Converting a Word Document to Markdown in One Move

The Problem

A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.

Installing Pandoc

On a mac you can use homebrew by running the command brew install pandoc.

The Solution

@hasnainr
hasnainr / fibbonaci.py
Created May 5, 2020 10:25
Example of sum numbers in series of fibbonaci
def fibbonaci(n):
if n <= 0:
print("You cannot enter numbers less than 0")
elif n == 1:
return 0
elif n == 2:
return 1
else:
return fibbonaci(n-1)+fibbonaci(n-2)
def calcularPares(n):
@hasnainr
hasnainr / opencv-logo.py
Created March 5, 2020 10:08
Try to create the logo of OpenCV using drawing functions available in OpenCV.
import numpy as np
import cv2 #3.4.2
import math
r1 = 70
r2 = 30
ang = 60
d = 170