Skip to content

Instantly share code, notes, and snippets.

View prasoon2211's full-sized avatar

Prasoon Shukla prasoon2211

View GitHub Profile
@prasoon2211
prasoon2211 / index.htlm
Created March 7, 2024 00:22
generate charts
<!DOCTYPE html>
<html>
<head>
<title>Data Visualization Tool</title>
<script src="https://cdn.jsdelivr.net/npm/echarts@5.3.2/dist/echarts.min.js"></script>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
}
@prasoon2211
prasoon2211 / test.html
Created June 25, 2020 20:59
Org Example
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2020-06-25 Thu 22:59 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Determinants measure how much a linear map expands/shrinks a unit of (signed) volume</title>
<meta name="generator" content="Org mode" />
@prasoon2211
prasoon2211 / .zshrc
Last active May 23, 2020 07:03
ZSH RC
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
export TERM="xterm-256color"
# Path to your oh-my-zsh installation.
export ZSH="/Users/prasoon.shukla/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
@prasoon2211
prasoon2211 / Makefile
Last active August 10, 2019 11:05
Jupyterlab docker image
jupyterlab : docker run --rm -u root -p 8898:8888 -v $(pwd):/app prasoon2211/python_ds jupyter-lab --allow-root --no-browser --NotebookApp.token=''
jupyternbk : docker run --rm -u root -p 8898:8888 -v $(pwd):/app prasoon2211/python_ds jupyter-notebook --allow-root --no-browser --NotebookApp.token=''
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@prasoon2211
prasoon2211 / Contributions.md
Created December 7, 2016 20:12
Open source contributions
@prasoon2211
prasoon2211 / z_algo.py
Created November 14, 2015 18:13
Z algorithm in Python
def z_arr(s):
"""An advanced computation of Z-values of a string."""
# From https://ivanyu.me/blog/2013/10/15/z-algorithm/
Z = [0] * len(s)
Z[0] = len(s)
rt = 0
lt = 0
@prasoon2211
prasoon2211 / suffix_array.py
Last active November 12, 2019 08:15
Python suffix array
def sort_bucket(s, bucket, order):
d = defaultdict(list)
for i in bucket:
key = s[i:i+order]
d[key].append(i)
result = []
for k,v in sorted(d.iteritems()):
if len(v) > 1:
result += sort_bucket(s, v, order*2)
else:
@prasoon2211
prasoon2211 / string_chaining.cpp
Created October 29, 2015 16:21
String chaning
#include <iostream>
#include <string>
#include <vector>
#include <unordered_map>
#include <algorithm>
#define PR cout << 11 << endl;
using namespace std;
string arr[50010];