Skip to content

Instantly share code, notes, and snippets.

View bhardwajRahul's full-sized avatar
🎯
Focusing

Rahul Bhardwaj bhardwajRahul

🎯
Focusing
View GitHub Profile
@bhardwajRahul
bhardwajRahul / grokking_to_leetcode.md
Created April 19, 2023 06:41 — forked from tykurtz/grokking_to_leetcode.md
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

https://github.com/billw2/rpi-clone
sudo apt install git
git clone https://github.com/billw2/rpi-clone.git
cd rpi-clone
sudo cp rpi-clone rpi-clone-setup /usr/local/sbin
lsblk
sudo rpi-clone sda
@bhardwajRahul
bhardwajRahul / surveillance.py
Created December 1, 2022 16:27 — forked from avseng/surveillance.py
Raspberry Pi 4 surveillance system source code
import smtplib, email, os
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email import encoders
from picamera import PiCamera
from time import sleep
from datetime import datetime
import RPi.GPIO as GPIO
@bhardwajRahul
bhardwajRahul / padd.sh
Created October 15, 2020 03:24 — forked from giuliomagnifico/padd.sh
Custom PADD layout for 800x480px displays
#!/usr/bin/env bash
# shellcheck disable=SC2034
# shellcheck disable=SC1091
# shellcheck disable=SC2154
# PADD
#
# A more advanced version of the chronometer provided with Pihole
# SETS LOCALE
@bhardwajRahul
bhardwajRahul / riot-matrix-workshop.md
Created January 7, 2020 06:34 — forked from attacus/riot-matrix-workshop.md
Create your own encrypted chat server with Riot and Matrix

This guide is unmaintained and was created for a specific workshop in 2017. It remains as a legacy reference. Use at your own risk.

Running your own encrypted chat service with Matrix and Riot

Workshop Instructor:

This workshop is distributed under a CC BY-SA 4.0 license.

What are we doing here?

@bhardwajRahul
bhardwajRahul / profile.py
Created November 28, 2019 18:50 — forked from Shuhala/profile.py
Profile a code block
import cProfile
import contextlib
import io
import pstats
@contextlib.contextmanager
def profile(max_results=-1, pattern="*"):
"""
Profile a code block
@bhardwajRahul
bhardwajRahul / MultiThreadedSensorServer.py
Created July 24, 2019 20:40
UDP based Multi Threaded Sensor Server to receive data from IOT, Smartphone and other devices.
import socket
import threading
import time
class ThreadedServer(object):
def __init__(self, host, port):
self.host = host
self.port = port
self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
@bhardwajRahul
bhardwajRahul / webdev_online_resources.md
Created May 12, 2019 05:16 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
@bhardwajRahul
bhardwajRahul / stock.py
Created April 14, 2019 03:35 — forked from sanand0/stock.py
Pull currency and stock data
#! /usr/bin/env python
"""
Author: Bastin Robin
"""
import os
import logging
from urllib import urlencode
import datetime
import pandas as pd
@bhardwajRahul
bhardwajRahul / TechChallengeReview_52_20190208.md
Created February 20, 2019 11:24 — forked from blademirage/TechChallengeReview_52_20190208.md
Tech Challenge Review 52 (2019-02-08)

Considered this submission as a PASS case.

Submitted tech challenge:

Pros:

  • API endpoints naming follows problem statement.
  • Clean and tidy code.
  • Demonstrated well use of existing frameworks/libraries.