Skip to content

Instantly share code, notes, and snippets.

View sdushantha's full-sized avatar

Siddharth Dushantha sdushantha

View GitHub Profile

Keybase proof

I hereby claim:

  • I am sdushantha on github.
  • I am sdushantha (https://keybase.io/sdushantha) on keybase.
  • I have a public key ASAXcS0TOPiKe7QE2QB3RhSGkoAjmLlPFqWKDElM5P-n_Qo

To claim this, I am signing this object:

@sdushantha
sdushantha / type.py
Last active December 16, 2018 14:14
Script to cheat on TypingPal
from time import sleep
from pyautogui import press
import re
import sys
def cleanhtml(raw_html):
cleanr = re.compile('<.*?>')
cleantext = re.sub(cleanr, '', raw_html)
return cleantext
@sdushantha
sdushantha / easter-egg-finder.js
Last active August 22, 2019 14:23
Find all eggs on the Tine.no easter egg hunt challange
// Author: Siddharth Dushantha
//
// Find all eggs on the Tine.no easter egg hunt challange
//
// This script find all of the easter eggs in Tine's easter hunt challange
// allowing you to complete the whole hunt in a few seconds and then can
// be in the draw to win some prizes
//
// How to use this script:
// Open up inspect element, then go to the Console tab
@sdushantha
sdushantha / thinkib-solver.js
Last active August 22, 2019 14:22
Solve multiple choice questions on ThinkIB.net
// Author: Siddharth Dushantha
//
// Solve multiple choice questions on ThinkIB.net
//
// Disclaimer: This script has only been tested out on Physics questions
// but it should work on other subjects as well.
//
// How to use this script:
// Open up inspect element, then go to the Console tab
// Paste the code code below into the console
@sdushantha
sdushantha / instructions.md
Last active November 17, 2023 10:12
ncmpcpp + mpd + mpc on macOS

Install the required packages

brew install ncmpcpp mpd mpc

Make the.mpd directory in your home directory

mkdir ~/.mpd
$ python3 setup.py sdist
$ python3 -m twine upload dist/*
@sdushantha
sdushantha / study-com-bypass.js
Created January 12, 2020 16:16
Bypass Paywall on Study.com
javascript:(function() { document.getElementsByClassName("hidden")[1].className = ""; document.getElementsByClassName("hidden")[1].className = ""; document.getElementsByClassName("wikiContent faded-content")[0].className = ""; })();
class text:
purple = "\033[95m"
cyan = "\033[96m"
darkcyan = "\033[36m"
blue = "\033[94m"
green = "\033[92m"
yellow = "\033[93m"
red = "\033[91m"
magenta = "\033[35m"
white = "\033[37m"
lyrics_directory = ~/.config/ncmpcpp/lyrics
mpd_music_dir = ~/Music
visualizer_type = "spectrum"
visualizer_look = ●┃
visualizer_color = white
song_list_format = "{{%a %t}|{%f}}{$R%l}"
current_item_prefix = $(green)$r
current_item_inactive_column_prefix = $(black)$r

Source code for graph used in EE

import matplotlib.pyplot as plt
from collections import Counter, OrderedDict
import requests

r = requests.get("https://sherlock-holm.es/stories/plain-text/cano.txt")
text = r.text

chars_to_remove = []