<commit_before>#!/bin/bash
cd ~/openaps-dev
#eval `ssh-agent -s`
#ssh-add /home/sleibrand/.ssh/id_rsa.sleibrand-git
#git fetch --all && git reset --hard origin/master && git pull
git pull
stat -c %y clock.json | cut -c 1-19
cat clock.json | sed 's/"//g' | sed 's/T/ /'
echo
calculate-iob pumphistory.json profile.json clock.json > iob.json.new && grep iob iob.json.new && mv iob.json.new iob.json
determine-basal iob.json currenttemp.json glucose.json profile.json > requestedtemp.json.new && grep temp requestedtemp.json.new && mv requestedtemp.json.new requestedtemp.json
node ~/openaps-js/bin/pebble.js  glucose.json clock.json iob.json current_basal_profile.json currenttemp.json isf.json requestedtemp.json > /tmp/pebble-openaps.json
cat /tmp/pebble-openaps.json
jsonlint /tmp/pebble-openaps.json && cp /tmp/pebble-openaps.json /var/www/openaps.json 
cat /var/www/openaps.json
<commit_msg>replace calculate-iob and determine-basal with their openaps invoke equivalents<commit_after>#!/bin/bash
cd ~/openaps-dev
#eval `ssh-agent -s`
#ssh-add /home/sleibrand/.ssh/id_rsa.sleibrand-git
#git fetch --all && git reset --hard origin/master && git pull
git pull
stat -c %y clock.json | cut -c 1-19
cat clock.json | sed 's/"//g' | sed 's/T/ /'
echo
#calculate-iob pumphistory.json profile.json clock.json > iob.json.new && grep iob iob.json.new && mv iob.json.new iob.json
openaps invoke iob.json.new && grep iob iob.json.new && mv iob.json.new iob.json
#determine-basal iob.json currenttemp.json glucose.json profile.json > requestedtemp.json.new && grep temp requestedtemp.json.new && mv requestedtemp.json.new requestedtemp.json
openaps invoke requestedtemp.json.new && grep temp requestedtemp.json.new && mv requestedtemp.json.new requestedtemp.json
git pull && git push
node ~/openaps-js/bin/pebble.js  glucose.json clock.json iob.json current_basal_profile.json currenttemp.json isf.json requestedtemp.json > /tmp/pebble-openaps.json
cat /tmp/pebble-openaps.json
jsonlint /tmp/pebble-openaps.json && cp /tmp/pebble-openaps.json /var/www/openaps.json 
cat /var/www/openaps.json

{'fraction_non_alphanumeric': 0.13557692307692307, 'fraction_numerical': 0.0028846153846153848, 'mean_word_length': 4.050970873786408, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2073192', 'n_tokens_mistral': 788, 'n_tokens_neox': 758, 'n_words': 180}