Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ExternalEvaluate[{"Python", | |
"Evaluator" -> <| | |
"PythonRuntime" -> File["/opt/homebrew/bin/python3.12"]|>}, | |
File["/Users/steven/Library/Mobile \ | |
Documents/com~apple~CloudDocs/Scripts/Python/datacollection.py"]]; | |
dbr = DatabaseReference[ | |
URL["mysql://xxx:[email protected]/\ | |
personalinformatics"]]; | |
accessToken = | |
"xxx"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3.12 | |
import pandas as pd | |
import sqlalchemy | |
import requests as r | |
from datetime import datetime, timedelta | |
import xml.etree.ElementTree as et | |
import zipfile | |
import json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
Requires creation of a webhook on https://bouncie.dev to post to an Apache CouchDB database exposed to the Internet. | |
Substitute '6984' as the port number if you prefer a secure connection after setting up SSL according to the Apache | |
CouchDB Instructions. | |
The 'tripData' view used here to retrieve just tripData entries is as follows in CouchDB: | |
function (doc) { | |
if (doc.eventType == 'tripData') | |
emit(doc.data, null); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/pwsh | |
$access_token="<INSERT FACEBOOK ACCESS TOKEN HERE: https://developers.facebook.com/tools/accesstoken/" | |
$data = invoke-restmethod "https://graph.facebook.com/v18.0/me/posts?fields=title,application,backdated_time,caption,child_attachments,id,coordinates,created_time,description,event,full_picture,message,name,object_id,parent_id,place,scheduled_publish_time,status_type,story,type,updated_time,attachments,comments,link,permalink_url,reactions&limit=100&access_token=$access_token" -ErrorAction Stop | |
while ($true) { | |
foreach ($p in $data.data) { | |
if ($p.backdated_time -ne $null) { | |
$posttime = $p.backdated_time.toString('s').replace('T', ' ') | |
} | |
else { |