Skip to content

Instantly share code, notes, and snippets.

View padamupreti's full-sized avatar
🤔
Thinking More

Padam Upreti padamupreti

🤔
Thinking More
View GitHub Profile
@padamupreti
padamupreti / hashtable.c
Last active February 3, 2023 04:45
hash table implementation
// DSA - Hash Table implementation heavily derived from https://youtu.be/wg8hZxMRwcw
// and file from the repository (in video description)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define TABLE_SIZE 10000
typedef struct entry {
char *key, *value;
@padamupreti
padamupreti / psgen.py
Last active January 12, 2022 15:32
strong passphrase generator and copier
# strong passphrase generator and copier
from secrets import choice, randbelow
from string import ascii_lowercase, ascii_uppercase, punctuation, digits
import pyperclip # pip install pyperclip
def choose_specified(group, num=2):
if len(group) == 1:
return group
return ''.join(choice(group) for _ in range(num))