Skip to content

Instantly share code, notes, and snippets.

View rashmitpankhania's full-sized avatar
🤗
cheeeeling

Rashmit Pankhania rashmitpankhania

🤗
cheeeeling
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rashmitpankhania
rashmitpankhania / Header.js
Created June 4, 2020 17:39
gist for the issue "services menu for the key events(like mouse events)"
import AppBar from '@material-ui/core/AppBar';
import Toolbar from '@material-ui/core/Toolbar';
import useScrollTrigger from '@material-ui/core/useScrollTrigger';
import makeStyles from '@material-ui/styles/makeStyles';
import React from 'react';
import { Tab } from '@material-ui/core';
import Tabs from '@material-ui/core/Tabs';
import Button from '@material-ui/core/Button';
import { Link } from 'react-router-dom';
import Menu from '@material-ui/core/Menu';
@rashmitpankhania
rashmitpankhania / Simple_Arithmetics.py
Created March 14, 2018 20:23
SPOJ Problem - ARTH For more info - http://www.spoj.com/problems/ARITH/ Still need help.
def showoff(ans):
shift = max(len(str(ans)), len(op[1]) + 1, len(op[0]))
print(op[0].rjust(shift))
print((f + op[1]).rjust(shift), end=" \n")
print('-' *shift)
print(str(ans).rjust(shift))
for _ in range(int(input())):
f = ''
@rashmitpankhania
rashmitpankhania / 1.py
Last active March 12, 2018 16:35
Convert the expression from infix to postfix i.e Reverse Polish Notation in Python3
def high_precedence(a, b):
if b == '^':
return False
else:
if a in '/*' and b in '+-':
return True
else:
return False
@rashmitpankhania
rashmitpankhania / index.py
Created December 9, 2017 13:42
This file contains the algorithm to find the Davies Boouldin Index ut initaiol changes must be there.
import pandas as pd
from sklearn.cluster import k_means
from scipy.spatial import distance
def compute_s(i, x, labels, clusters):
norm_c= len(clusters)
s = 0
for x in clusters:
s += distance.euclidean(x, clusters[i])