Skip to content

Instantly share code, notes, and snippets.

View stephenleo's full-sized avatar
🇸🇬

Marie Stephen Leo stephenleo

🇸🇬
View GitHub Profile
@stephenleo
stephenleo / 00_SQL in Google Colab.md
Last active January 29, 2024 07:31
[Medium] SQL in Google Colab

SQL in Google Colab

All the code for the Medium Post

Open In Colab

@stephenleo
stephenleo / 00_Introducing Boy or Girl - a Machine Learning Web App to Detect Gender fromName.md
Last active April 23, 2023 09:03
[Medium] Boy or Girl? A Machine Learning Web App to Detect Gender from Name

Code for the medium post

numpy==1.19.5
tensorflow==2.4.1
scikit-learn==0.24.2
@stephenleo
stephenleo / 00_Powering Semantic Similarity Search in Computer Vision with State of the Art Embeddings.md
Last active February 27, 2022 12:32
[Medium] Powering Semantic Similarity Search in Computer Vision with State of the Art Embeddings

Powering Semantic Similarity Search in Computer Vision with State of the Art Embeddings

Code for the Medium post Link

@stephenleo
stephenleo / 01_useful_commands.md
Last active February 3, 2022 08:17
ElasticSearch

Useful ES commands

  1. Check available nodes: curl 'http://<ip_address>:9200/_cat/nodes?v'
  2. Check available indices: curl 'http://<ip_address>:9200/_cat/indices?v'
  3. Delete a specific index: curl -X DELETE 'http://:9200/?pretty'
@stephenleo
stephenleo / 00_Python.md
Last active January 10, 2024 04:16
Python

Python

A collection of useful Python snippets

@stephenleo
stephenleo / 00_Supercharged_Semantic_Similarity_Search_in_Production.md
Last active April 1, 2024 12:45
[Medium] Supercharged Semantic Similarity Search in Production

Supercharged Semantic Similarity Search in Production

Code for the Medium post Link

@stephenleo
stephenleo / 00_make_money_on_the_side_with_data_science.md
Last active March 22, 2022 12:53
[Medium] Make Money on the side with Data Science!

Make Money on the side with Data Science!

Code for the Medium post Link

@stephenleo
stephenleo / 01_DBS.md
Last active April 14, 2022 11:44
Interview

DBS (Development Bank of Singapore) Data Analyst Interview

  1. Python puzzle
    • Given a $2 \times 1$ non-negative integer array $\vec{a}$ and a $1 \times n$ integer array $\vec{b}$, write a function to return a $2 \times n$ logical matrix $x_{ij}$ such that $\sum_{j=1}^{n}x_{ij} = a_i$ and $\sum_{i=1}^{2}x_{ij} = b_j$. If there is no working matrix, please return string "impossible" (15 mins).
    • What is logical matrix? This is a matrix that $x_{ij} \in {0,1}$
    • Example: $\vec{a} = \begin{bmatrix} 3 \ 2\end{bmatrix}$, $\vec{b} = \begin{bmatrix} 2 & 1 & 1 & 0 & 1\end{bmatrix}$, one possible matrix is $\begin{bmatrix} 1 & 1 & 1 & 0 & 0 \ 1 & 0 & 0 & 0 & 1\end{bmatrix}$
    • Solution:
      import numpy as np
@stephenleo
stephenleo / 00_sts.md
Last active February 17, 2024 08:32
[Medium] Semantic Textual Similariy

Semantic Textual Similarity

Code for the Medium post Link

@stephenleo
stephenleo / 00_arxiv_semantic_paper_search.md
Last active March 22, 2023 21:50
[Medium] ArXiv Semantic Paper Search

ArXiv Semantic Paper Search

  • Code from the Medium post Link