Skip to content

Instantly share code, notes, and snippets.

@davidrajm
davidrajm / countries.sql
Created August 15, 2019 17:19 — forked from adhipg/countries.sql
Sql dump of all the Countries, Country Codes, Phone codes.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@davidrajm
davidrajm / index.html
Created January 13, 2021 06:20
Initial Setup for MathJax CDN
<!DOCTYPE html>
<html lang="en">
<head>
<script async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<title>MathJax</title>
</head>
<body>
<div class="container">
$$ x = -b \pm \frac{\sqrt{b^2 - 4ac}}{2a}$$
</div>
@davidrajm
davidrajm / index.html
Created January 13, 2021 10:27
Complete Code for render Math Dynamically using MathJax
<!DOCTYPE html>
<html lang="en">
<head>
<script async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<title>MathJax</title>
<style>
.container{
max-width: 900px;
margin:0 auto;
@davidrajm
davidrajm / plot_helper.py
Last active April 23, 2021 17:51
This helper script will give a function to plot the given vectors. One can input the 2-tuple vectors in an array and get the plot of them.
def plot_vectors(vectors, title=None):
import numpy as np
from matplotlib import pyplot as plt
# Initiate the plot
fig, ax = plt.subplots(figsize = (5,5))
# Draw each vector as quiver plot
for x_cor, y_cor in vectors:
ax.quiver(0,0,x_cor,y_cor,
scale=1,angles='xy',