Skip to content

Instantly share code, notes, and snippets.

View hello-alf's full-sized avatar
🏠
Working from home

Luis Alfredo Quispe Villca hello-alf

🏠
Working from home
  • La Paz, Bolivia
  • 20:44 (UTC -04:00)
View GitHub Profile
// This function converts the byte to the corresponding amount, be it kilo, mega, GB, etc.
const convertWeightByte = (byte) => {
let sizekiloByte = (byte / 1024);
let sizeMega = (sizekiloByte / 1024);
let sizeGigabyte = (sizeMega / 1024);
let sizeTerabyte = (sizeGigabyte / 1024);
let sizePetabyte = (sizeTerabyte / 1024);
let sizeExabyte = (sizePetabyte / 1024);
if(sizekiloByte > 0 && sizekiloByte <= 1024){
@noize-e
noize-e / loads_dynamodb_json_schema.py
Last active October 22, 2023 18:06
Convert a dynamodb JSON schema into a regular JSON
from pprint import pprint
import json
import sys
import os
DATA_TYPES = {
"S": lambda x: str(x),
"B": lambda x: bool(x),
"N": lambda x: str(x),