Skip to content

Instantly share code, notes, and snippets.

View dennisseah's full-sized avatar

Dennis Seah dennisseah

  • Microsoft
  • Sunnyvale
View GitHub Profile
@dennisseah
dennisseah / main.py
Last active December 30, 2022 23:50
solving a 9 x 9 sudoku with Python
from math import floor
# example of puzzle9x9_1.txt (0 = value to fill)
#
# 0 4 3 0 8 0 2 5 0
# 6 0 0 0 0 0 0 0 0
# 0 0 0 0 0 1 0 9 4
# 9 0 0 0 0 4 0 7 0
# 0 0 0 6 0 8 0 0 0
# 0 1 0 2 0 0 0 0 3
@dennisseah
dennisseah / main.py
Created November 28, 2022 04:13
TF-IDF with PyPDF2
# nltk==3.7
# pandas==1.5.2
# PyPDF2==2.11.2
# scikit-learn==1.1.3
from PyPDF2 import PdfReader
import io
import pandas as pd
import requests
@dennisseah
dennisseah / main.py
Created November 26, 2022 05:25
Azure Face Recognition
# azure-cognitiveservices-vision-face==0.6.0
# image==1.5.33
import os
import json
import requests
from azure.cognitiveservices.vision.face import FaceClient
from azure.cognitiveservices.vision.face.models import DetectedFace
from msrest.authentication import CognitiveServicesCredentials
@dennisseah
dennisseah / main.py
Created November 24, 2022 05:55
Azure Search Python SDK
# azure-search-documents==11.3.0
# faker=15.3.3
import os
from azure.core.credentials import AzureKeyCredential
from azure.search.documents import SearchClient
from azure.search.documents.indexes import SearchIndexClient
from azure.search.documents.indexes.models import (
CorsOptions,
ComplexField,
@dennisseah
dennisseah / main.py
Created November 22, 2022 20:41
CSV vs Parquet file format
# pandas = "1.5.1"
# faker = "15.3.2"
# matplotlib = "3.6.2"
# pyarrow = "10.0.0"
from faker import Faker
from timeit import default_timer as timer
import math
import matplotlib.pyplot as plt
import argparse
import cv2
import json
import os
import sys
def metadata(filename, video):
return {
"file_name": filename.split(os.path.sep)[-1],
#!/bin/bash
# Get all the resources that are assessible by me
# and order them by last modified date
# create a file, `resources.sh` with the content of this script
# and run `bash resources.sh`
AccountStore="accounts.csv"
ResourcegroupStore="resourcegroups.csv"
@dennisseah
dennisseah / aspNetDevOnMac.md
Last active April 14, 2020 16:46
ASP.NET MVC Development on Mac OSX
@dennisseah
dennisseah / createAzureFunc.md
Last active April 3, 2020 17:38
Create Azure Function

Create Azure Function

platform: mac-OS language: Javascript

install Azure CLI

brew update && brew install azure-cli

validate