Skip to content

Instantly share code, notes, and snippets.

View swanav's full-sized avatar
:octocat:

Swanav Swaroop swanav

:octocat:
View GitHub Profile
@swanav
swanav / db.json
Last active March 2, 2022 08:43
India : States and Districts
[
{
"name": "Andaman and Nicobar Islands",
"districts": [
{
"name": "Nicobar"
},
{
"name": "North and Middle Andaman"
},
@swanav
swanav / b64_encode.py
Created March 5, 2022 10:37
Create a base64 string for a file
import argparse
import base64
def main(args):
file_content = None
with open(args.input, 'rb') as f:
file_content = f.read()
b64_content = base64.b64encode(file_content)