Skip to content

Instantly share code, notes, and snippets.

@jmettes
Created November 26, 2016 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmettes/c9f657e78184d74d703c224df81d781d to your computer and use it in GitHub Desktop.
Save jmettes/c9f657e78184d74d703c224df81d781d to your computer and use it in GitHub Desktop.
import boto3
import json
from decimal import Decimal
# TIME(GPST) SAT R P1(m) P2(m) L1(cyc) L2(cyc) D1(Hz) D2(Hz) S1 S2 LLI
# 08:29:20.0 G02 1 24371639.98 24371633.08 128073906.34 99797864.41 0.0 0.0 45 32 0 0
dynamodb = boto3.resource('dynamodb', region_name='ap-southeast-2')
table = dynamodb.Table('obs')
epoch = "08:29:20.0"
sat = "G02"
r = 1
p1 = Decimal(24371639.98)
p2 = Decimal(24371633.08)
l1 = Decimal(128073906.34)
l2 = Decimal(99797864.41)
d1 = Decimal(0.0)
d2 = Decimal(0.0)
s1 = 45
s2 = 32
lli = "0 0"
table.put_item(
Item={
'epoch': epoch,
'sat': sat,
'r': r,
'p1': p1,
'p2': p2,
'l1': l1,
'l2': l2,
'd1': d1,
'd2': d2,
's1': s1,
's2': s2,
'lli': lli,
'cool': 1234
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment