Skip to content

Instantly share code, notes, and snippets.

View DeeprajPandey's full-sized avatar

Deepraj Pandey DeeprajPandey

View GitHub Profile

Reading List: Mesh-querading Surveillance in the Information Age

Compiled by: Deepraj Pandey | 27 May 2024

Over the next few days, we are going to engage in discussions about sociotechnical systems of varying scales. We had the opportunity to touch upon some of the concepts around surveillance, privacy, and security in the opening session. Pay attention to the aspects of the conversation this morning that struck a chord. This document is a curated list of readings and resources to aid your understanding of the concepts we will be discussing. Use these to help you get started with your research into the ideas you want to explore further for your final presentation.

Selected Articles

General Privacy and Surveillance

@DeeprajPandey
DeeprajPandey / main.cpp
Created April 26, 2024 11:07
ESP32 Getting Started with AsyncServer
#include <Arduino.h>
#include <ArduinoJson.h>
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include <Wifi.h>
#define LED 2
const char *ssid = "[SSID]";
const char *pswd = "[PASSWD]";
@DeeprajPandey
DeeprajPandey / Master -> Main.md
Created November 11, 2023 16:54
Rename default branch from master to main (and push changes to remote)

How to rename default branch in git on older repos...

Scenario: old repo, checked out locally. You discover that the default branch is master.

Follow these instructions to rename the branch - locally and on your remote copies.

Instructions

  1. Make sure you are on master
@DeeprajPandey
DeeprajPandey / README.md
Created May 5, 2023 11:35
Testimony: a generic python unit testing wrapper.

Testimony: Bearing witness to your code's quality

Welcome to Testimony, the tool that holds a mirror up to our code and provides a platform for it to testify to its own correctness. We all write code we're not proud of, tucked away in private repositories, hoping it will never see the light of day. But with Testimony, you can bring that code out of the shadows and into the light of public scrutiny.

Testimony provides a simple and intuitive interface for testing Python functions and verifying their outputs against a set of input-output pairs. Simply define your test cases in a JSON file, and Testimony will automatically run your code against each one and report any failures.

With Testimony, you can be confident that your code is functioning as expected and producing the correct outputs for a variety of inputs. No more second-guessing or relying on manual testing – Testimony has got you covered.

So what are you waiting for? Let Testimony be your guide to writing better, more reliable code, and let your co

@DeeprajPandey
DeeprajPandey / logging_config.py
Created May 4, 2023 14:31
Python Logger Config
import logging
import logging.config
import os
LOGGING_CONFIG = {
"version": 1,
"disable_existing_loggers": False,
"formatters": {
"standardFormatter": {
"format": "%(asctime)s %(levelname)s %(name)s: %(message)s",
@DeeprajPandey
DeeprajPandey / pset1_input_format.md
Created February 21, 2021 12:37
Input Format for problem pset 1

Problem 1: Pyramids of Asterisk

Input:

4

Output:

   *
  * *
 * * *
@DeeprajPandey
DeeprajPandey / a6_deeprajPandey.txt
Created September 23, 2020 05:39
[CS 1319 HW1] Your solution to the crosswords in question 6 should be in this format in a text file following this naming convention a6_<firstnameLastname>.txt
i
A B C
D E F
ii
G H I
J K L
iii
M N O
@DeeprajPandey
DeeprajPandey / dnstest.sh
Created July 24, 2020 10:10
DNS perfomance test script from https://github.com/cleanbrowsing/dnsperftest for reference.
#!/usr/bin/env bash
command -v bc > /dev/null || { echo "bc was not found. Please install bc."; exit 1; }
{ command -v drill > /dev/null && dig=drill; } || { command -v dig > /dev/null && dig=dig; } || { echo "dig was not found. Please install dnsutils."; exit 1; }
NAMESERVERS=`cat /etc/resolv.conf | grep ^nameserver | cut -d " " -f 2 | sed 's/\(.*\)/&#&/'`
PROVIDERS="
@DeeprajPandey
DeeprajPandey / ag.txt
Created February 15, 2020 06:45
Workshop Agenda
Cheat Sheets
Simpler Git Cheatsheet: github.com/arslanbilal/git-cheat-sheet#readme
Expanded, indexed (more popular): git.io/git-tips
GitHub cheatsheet: https://github.com/tiimgreen/github-cheat-sheet#readme
Talks
How GitHub uses GitHub to build GitHub: https://www.youtube.com/watch?v=qyz3jkOBbQY
@DeeprajPandey
DeeprajPandey / PP_pr.R
Created October 22, 2019 12:49
CS208 R Solutions
# q1
pi_D <- function(n, P) {
if(length(P) != n) {
stop("Number of probablities should be same as n")
}
else {
# return an element from {1,2,3,...n} with probability P
elem = sample(1:n, 1, TRUE, P)
return(elem)
}