Skip to content

Instantly share code, notes, and snippets.

View snimmagadda1's full-sized avatar
💭
🚀

Sai Nimmagadda snimmagadda1

💭
🚀
View GitHub Profile
@snimmagadda1
snimmagadda1 / recurse-google-java-format
Created March 30, 2023 01:44
Recursively format all .java files with google-java-format
#!/bin/bash
# Find all Java files in the current directory and its subdirectories
find . -name '*.java' -type f | while read file; do
# Format the Java file using google-java-format
google-java-format -i "$file"
done
@snimmagadda1
snimmagadda1 / AWS_dynamoDB.py
Last active March 17, 2019 16:27
Create an AWS DynamoDB item from a python dictionary, initialize a table, put an item into DynamoDB (using boto3)
import logging
import boto3
import json
import decimal
from botocore.exceptions import ClientError
logger = logging.getLogger()
# Format outputs
class DecimalEncoder(json.JSONEncoder):