Description of what the REST endpoint does.
- GET
/* | |
* | |
* Starting today, get each date for the last N days. | |
* | |
*/ | |
const lastNDates = (n) => { | |
let result = [] | |
let d = new Date() | |
let rd = `${d.getFullYear()}-${d.getMonth()+1}-${d.getDate()}` | |
result.push(rd) |
def scan_all(dynamodb_table): | |
"""Return all items from a DynamoDB table by passing the table resource.""" | |
results = [] | |
has_items = True | |
last_key = False | |
while has_items: | |
if last_key: | |
data = dynamodb_table.scan(ExclusiveStartKey=last_key) | |
else: | |
data = dynamodb_table.scan() |
[ | |
"alignContent", | |
"alignItems", | |
"alignSelf", | |
"aspectRatio", | |
"backfaceVisibility", | |
"backgroundColor", | |
"borderBottomColor", | |
"borderBottomEndRadius", | |
"borderBottomLeftRadius", |
response = client.copy_object( | |
ACL='private'|'public-read'|'public-read-write'|'authenticated-read'|'aws-exec-read'|'bucket-owner-read'|'bucket-owner-full-control', | |
Bucket='string', | |
CacheControl='string', | |
ContentDisposition='string', | |
ContentEncoding='string', | |
ContentLanguage='string', | |
ContentType='string', | |
CopySource='string' or {'Bucket': 'string', 'Key': 'string', 'VersionId': 'string'}, | |
CopySourceIfMatch='string', |
render() { | |
return ( | |
<View> | |
<View> | |
<Text>Meditation Timer</Text> | |
</View> | |
<Text>10:00</Text> | |
<Text>Close your eyes, relax, and breath naturally.</Text> | |
<TouchableOpacity > | |
<Text>Begin Session</Text> |
[ | |
"AliceBlue ", | |
"AntiqueWhite ", | |
"Aqua ", | |
"Aquamarine ", | |
"Azure ", | |
"Beige ", | |
"Bisque ", | |
"Black ", | |
"BlanchedAlmond ", |
import sys | |
import json | |
input_file = sys.argv[len(sys.argv)-1] | |
print('INPUT: ', input_file) | |
output_file = input_file + '.csv' | |
data = json.loads(open(input_file).read()) | |
# print(",".join(list(data[0].keys()))) | |
csv_headers = ",".join(list(data[0].keys())) | |
with open(output_file, 'w') as f: | |
f.write(csv_headers + '\n') |
#Update system | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
#Install Apache2 | |
sudo apt-get install apache2 -y | |
sudo a2enmod rewrite | |
sudo service apache2 restart | |
#Install PHP |
Description of what the REST endpoint does.
import pymysql | |
connection = pymysql.connect(host='<ip-or-domain>', | |
user='<dbuser>', | |
password='<dbpass>', | |
db='<dbname>', | |
charset='utf8mb4', | |
cursorclass=pymysql.cursors.DictCursor, | |
autocommit=True) |