Skip to content

Instantly share code, notes, and snippets.

View cyberboysumanjay's full-sized avatar
:bowtie:
Learning

Sumanjay cyberboysumanjay

:bowtie:
Learning
  • Sj Projects
  • Noida, India
View GitHub Profile
# DSA Question Bank
## Arrays, Hashing, Prefix/Suffix
1. Find the second largest element in one pass without extra space.
2. Find the k largest distinct elements without fully sorting the array.
3. Find the two numbers that appear once when every other number appears twice.
4. Find the majority element that appears more than n / 2 times.
5. Find all elements that appear more than n / 3 times.
6. Count inversions in an array.
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@cyberboysumanjay
cyberboysumanjay / country_code.json
Created May 21, 2020 07:09
Country along with their Codes
[
{
"Code": "AF",
"Name": "Afghanistan"
},
{
"Code": "AX",
"Name": "Åland Islands"
},
{
@cyberboysumanjay
cyberboysumanjay / README.md
Created November 10, 2019 20:21 — forked from cryocaustik/README.md
JSON Dump of ICD 10 Codes & Desc

CMS ICD GEMs JSON Dump

JSON Dump of ICD 10 Codes & Desc

Data Sample (formatted)

[
    {
      "code": "A000",
@cyberboysumanjay
cyberboysumanjay / IndianIPTV.m3u
Created May 29, 2019 03:37
Links for live streaming
#EXTINF:0, group-title="English",& Flix
http://z5ams.akamaized.net/andflix/tracks-v1a1/index.m3u8
#EXTINF:0, group-title="Hindi",& Pictures
#EXTINF:0, group-title="Hindi",& Pictures HD
http://z5ams.akamaized.net/andpicshd/tracks-v1a1/index.m3u8
#EXTINF:0, group-title="Punjabi",5aab TV
http://158.69.124.9:1935/5aabtv/5aabtv/playlist.m3u8
#EXTINF:0, group-title="Tamil",??
http://mhms9.airtel.tv/wh7f454c46tw4163224253_611767333/PLTV/88888888/224/3221226313/index.m3u8
#EXTINF:0, group-title="Telugu",10 TV
@cyberboysumanjay
cyberboysumanjay / install_phantomJs.sh
Created July 22, 2018 06:20 — forked from ManuelTS/install_phantomJs.sh
This script installs PhantomJS on your Debian/Ubuntu System
#!/usr/bin/env bash
# This script installs PhantomJS on your Debian/Ubuntu System
#
# Taken from https://gist.github.com/julionc/7476620#gistcomment-2030572 and changed the download directory
#
# This script must be run as root:
# sudo sh install_phantomjs.sh
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
@cyberboysumanjay
cyberboysumanjay / checkUrlExists.m1.py
Created July 18, 2018 17:17 — forked from fedir/checkUrlExists.m1.py
Check if URL exists via Python
from urllib2 import urlopen
code = urlopen("http://example.com/").code
if (code / 100 >= 4):
print "Nothing there."
# via http://stackoverflow.com/questions/1966086/how-can-i-determine-if-anything-at-the-given-url-does-exist
@cyberboysumanjay
cyberboysumanjay / opencv.py
Created June 28, 2018 11:20
Image Processing in python using OpenCV
import numpy as np
import cv2
from matplotlib import pyplot as plt
img=cv2.imread('chess_board.jpg',0)
sobelx=cv2.Sobel(img,cv2.CV_64F,1,0,ksize=5)
sobely=cv2.Sobel(img,cv2.CV_64F,0,1,ksize=5)
plt.subplot(2,2,1),plt.imshow(img,cmap='gray')
plt.title("Original"),plt.xticks([]),plt.yticks([])
@cyberboysumanjay
cyberboysumanjay / harlem-shake.txt
Created August 20, 2017 12:53
This code will make websites do Harlem-Shake.
1. Go to Google Chrome
2. Go to any website (works cool on facebook)
3. Right click anywhere -> Inspect Element
4. Click on the rightmost "Console" tab.
5. Copy paste the following * into the console.
6. Make sure the volume isn't too loud!
6. Press Enter.
* Copy paste the following text in the console:
package server
//see github.com/jpillora/scraper for config specification
//cloud-torrent uses "<id>-item" handlers
var defaultSearchConfig = []byte(`{
"kat": {
"name": "Kickass Torrents",
"url": "https://kickass.cd/search/{{query}}/{{page:1}}/?field=seeders&sorder=desc",
"list": "#mainSearchTable table tr[id]",
"result": {