This file contains 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
-- Park cursor here on Line 1, hit RUN button | |
-- To covert from selectable to runtime, mass substitute 23192 or similar valid canvas_id for a course instead of :course | |
-- Engagement for Snapshot: | |
-- Run in 2 sections...select and run from line 314 up first, then remainder | |
-- Tables labeled with my initials had to be made in the public schema because I am read-only to Redshift. | |
-- They are temporary tables and drop at the close of session. | |
-- Engagement Score represents the computed_final_score (final course grade, 0 - 100) we would predict if using Engagement relative to the atomic section cohort as the sole predictor. | |
-- Per https://github.com/unizin/snapshot/wiki/Using-Canvas-Data-for-Snapshot#4-engagement-charts : |
This file contains 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
import json | |
import random | |
import pytz | |
import uuid | |
from datetime import datetime, timedelta | |
from random_words import RandomNicknames, RandomWords | |
from elasticsearch import Elasticsearch |
This file contains 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
--- | |
- hosts: localhost | |
gather_facts: no | |
become: no | |
vars: | |
db_stuff: | |
ev: ev | |
test: evtester | |
tasks: |
This file contains 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
# Get nuxeo config parameters as <name>=<value> pairs, one per line. | |
# grep gets rid of other output. | |
# Perform replacement so that the results can be assigned to an associative array. | |
RAW_CONFIG=$( | |
nuxeoctl --get-regexp config '.' | | |
grep '=' | | |
sed -r 's/([^=]*)=(.*)/\[\1\]="\2"/') | |
# Assign transformed results to an associative array. |
This file contains 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
- name: Find default VPC for region | |
command: "aws ec2 describe-vpcs --region={{ region }} --output=json --filters=Name=isDefault,Values=true --query=Vpcs[0].VpcId" | |
register: default_vpc | |
- name: Set default_vpc_id fact | |
set_fact: | |
default_vpc_id: "{{ default_vpc.stdout | from_json }}" | |
- name: Find availability zones in the default VPC | |
ec2_vpc_subnet_facts: |
This file contains 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
# Shortcut for assigning a heredoc to a variable. | |
# http://stackoverflow.com/a/8088167 | |
define() { | |
# read will have exit status 1 whenever it assigns to a variable or it gets to EOF. | |
read -r -d '' "${1}" || true | |
} | |
_other_aws_common_stuff() { | |
export AWS_DEFAULT_PROFILE="${AWS_PROFILE}" | |
local SCRIPT |
This file contains 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
# The first time you try to run `locate`, it will tell you the database hasn't been built and tell you to run this. | |
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist | |
# I want to see all the files. Tell finder to show hidden files, too. | |
defaults write com.apple.finder AppleShowAllFiles YES |
This file contains 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
id | label | obsolete | ordering | |
---|---|---|---|---|
A101 | CD standard audio format | 0 | 1 | |
A102 | SACD super audio format | 0 | 2 | |
A103 | MP3 format | 0 | 3 | |
A104 | WAV format | 0 | 4 | |
A105 | Real Audio format | 0 | 5 | |
A106 | WMA | 0 | 6 | |
A107 | AAC | 0 | 7 | |
A108 | Ogg/Vorbis | 0 | 8 | |
A109 | Audible | 0 | 9 |