Skip to content

Instantly share code, notes, and snippets.

@parthi2929
parthi2929 / markdown_wp_plugin_issue.md
Created April 19, 2018 09:07
To illustrate numbering issue in Markdown Shortcode WP pllugin

[markdown] Think of this: You are in a node 1 of tree below. You need to find a way out traversing all nodes.

[/markdown][wp_graphviz] graph G { node [shape=circle width=0.4 style=filled]; label="Graph 1"; ranksep = 0.1; nodesep=0.8; 1 -- 2;

@parthi2929
parthi2929 / nested_shortcode_issue_1.txt
Created April 19, 2018 09:53
This file as a markdown fails for only the last graphviz and first tabular column, (even when those r replaced with working ones in same file). Why?
[markdown]
**Think of this**: You are in a node 1 of tree below. You need to find a way out traversing all nodes.
[wp_graphviz]
graph G {
node [shape=circle width=0.4 style=filled];
label="Graph 1";
ranksep = 0.1;
nodesep=0.8;
1 -- 2;
@parthi2929
parthi2929 / test.ipynb
Created May 6, 2018 07:17
Test file with a single image to test nbconvert export
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@parthi2929
parthi2929 / romania_helper_ipython.py
Created May 10, 2018 07:30
Created a plotly type romania map for search algorithms.
import networkx as nx
import matplotlib.pyplot as plt
from plotly.graph_objs import Scatter,Line,Marker,Figure, Data, Layout, XAxis,YAxis
from plotly.offline import iplot,init_notebook_mode
from math import floor
init_notebook_mode(connected=True)
"""
import numpy as np
from math import sin, cos, pi
from matplotlib import pyplot as plt
"""
Helper functions for "Reconsctrucing Trajectories" project
Author: Parthiban R
"""
class Vehicle:
def __init__(self):
@parthi2929
parthi2929 / goldsong.ipynb
Last active January 29, 2019 05:17
Below is the response for Many Flips Quiz from Problem Set 2 - Probability Section in Udacity's Intro to Statistics. An awesome person Mr. Goldsong has given this answer. Unfortunately, Udacity's discussion forums have dropped support for Mathjax long back, so all these replies having latex were messed up in original post. So I have cleaned it u…
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@parthi2929
parthi2929 / Seaborn lmplot with funcanimation (Error)
Last active July 23, 2018 09:55
trying to use lmplot in funcanimation but in vain.. trying to improvise..
This file has been truncated, but you can view the full file.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Random Population"
]
},
{
@parthi2929
parthi2929 / bi_to_nor_demo.py
Created August 7, 2018 10:32
Helper functions to plot graphs and generate probability related samples and theoretical distributions
import matplotlib.pyplot as plt
import numpy as np
from math import sqrt, pi
from coinflipviz import autoformat
from pytexit import py2tex
def plot_bi_nor(df, fontsize=10, mu=0, sigma=1, C='1/(sigma*sqrt(2*pi))', E='-(((X-mu)/sigma)**2)/2', xstepsize=10):
"""
Given the dataframe with x, n(x), p(x) this provides one plot:
x vs p(x) along with normal approx curve
@parthi2929
parthi2929 / SDSP_helper
Last active August 8, 2018 11:59
Helper functions..
# SDSP = Sample Distribution of Sample Proportions
# This is helper file for programmatic illustrations of SDSP concepts.
from random import shuffle
import pandas as pd
def create_bernoulli_population(N, p):
"""
Given the total size of population N, probability of a specific outcome,
and associated bernoulli variable as list (of outcomes), this returns a shuffled
@parthi2929
parthi2929 / SDSM.ipynb
Created August 8, 2018 11:58
Sample Distribution of Sample Means (Draft)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.