Skip to content

Instantly share code, notes, and snippets.

View Lord-V15's full-sized avatar
🥳
if weekend : party()

Vibhansh Lord-V15

🥳
if weekend : party()
View GitHub Profile
@Lord-V15
Lord-V15 / quora_question_similarity.ipynb
Created March 26, 2021 11:47
quora_question_similarity.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Lord-V15
Lord-V15 / kNN_ES_search.py
Created April 16, 2021 17:23
Settings and search calls in ElasticSearch for vector similarity search
# Idea : use this to index Quora's Question Pair dataset and explore the search results
doc = {
"settings": {
"index.knn": True
},
"mappings": {
"properties": {
"title": {
"type" : "text"
},
@Lord-V15
Lord-V15 / stylometry_pystyl.py
Last active May 10, 2021 09:34
PyStyl is a Python package for stylometry or the quantitative analysis of writing style. Pronounced as "Pistol".
# 2-D Scatter Plot using PCA
from pystyl.analysis import distance_matrix, hierarchical_clustering
from pystyl.visualization import scatterplot, scatterplot_3d
from pystyl.analysis import pca
pca_coor, pca_loadings = pca(corpus, nb_dimensions=2)
scatterplot(corpus, coor=pca_coor, nb_clusters=0, loadings=pca_loadings, plot_type='static',\
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Lord-V15
Lord-V15 / SpeakerRecognition.md
Last active September 12, 2023 01:56
MICROSOFT AZURE SPEAKER RECOGNITION IN PYTHON

For anyone in the future who's gonna try this service from Azure, let me give you an easy way out. I spent a lot of time on Speaker Recognition and the official docs say something and the samples given do something else. I will use the official REST API Docs for the text-independent method.

CREATE PROFILE 👇

import http.client
import json

conn = http.client.HTTPSConnection('westus.api.cognitive.microsoft.com')
@Lord-V15
Lord-V15 / verification.html
Created October 29, 2021 14:44
Custom Email HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Verify your email address</title>
<style type="text/css" rel="stylesheet" media="all">
/* Base ------------------------------ */
*:not(br):not(tr):not(html) {
font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
@Lord-V15
Lord-V15 / FastAPI-DetaBase.py
Last active December 21, 2023 02:13
Using FastAPI with Deta's Base
# all of the login functionality was handled by AWS Cognito.
# lib imports
from fastapi import APIRouter, HTTPException, status
from pydantic import BaseModel
from typing import Optional
from deta import Deta
import os
from dotenv import load_dotenv
# .env file loading
@Lord-V15
Lord-V15 / Text Dependent Recognition.ipynb
Created April 8, 2022 13:18
Azure Cognitive - Speech Recognition Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Lord-V15
Lord-V15 / scatter-plot.markdown
Last active June 6, 2023 12:55
Train vs Test data chart
@Lord-V15
Lord-V15 / S3-knowledge-graph.html
Created January 1, 2024 12:20
A knowledge graph idea using REBEL
<html>
<head>
<meta charset="utf-8">
<script src="lib/bindings/utils.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/dist/vis-network.min.css" integrity="sha512-WgxfT5LWjfszlPHXRmBWHkV2eceiWTOBvrKCNbdgDYTHrT2AeLCGbF4sZlZw3UMN3WtL0tGUoIAKsu8mllg/XA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis-network/9.1.2/dist/vis-network.min.js" integrity="sha512-LnvoEWDFrqGHlHmDD2101OrLcbsfkrzoSpvtSQtxK3RMnRV0eOkhhBN2dXHKRrUU8p2DGRTk35n4O8nWSVe1mQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<center>