Skip to content

Instantly share code, notes, and snippets.

View adam-phillipps's full-sized avatar

Adam adam-phillipps

  • NGage
  • Salt Lake City, UT.
View GitHub Profile
require 'dotenv'
Dotenv.load('.cerebrum.env')
require 'cloud_powers'
require 'pathname'
require 'byebug'
require_relative 'job'
require_relative 'task'
module Smash
class Cerebrum
# Get or create an EC2 client and cache that client so that a Context is more well tied together
# === @params: opts [Hash]
# * stub_responses: defaulted to false but it can be overriden with the desired responses for local testing
# * region: defaulted to use the `#region()` method
# * AWS::Credentials object, which will also scour the context and environment for your keys
# === @returns: AWS::EC2 client
# === Sample Usage
# ```
# config = stub_responses: {
require_relative '../admin/account_dropdown'
require_relative '../../pages/admin/admin_listings_page'
class Header < SitePrism::Section
element :login_link, 'div#user-nav a'
element :catalogo, "div.header-branding a[href='/']"
element :listings, "a[href='/admin#/products']"
element :catalogs, "a[href='/admin#/accounts']"
element :promotions, "a[href='/admin#/promotions']"
element :reports, "a[href='/admin#/reports']"
/Users/gerardoparajeles/.rbenv/shims/bundle exec /Users/gerardoparajeles/.rbenv/versions/2.3.1/bin/ruby -e at_exit{sleep(1)};$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)
/Users/gerardoparajeles/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/ruby-debug-ide-0.6.1.beta2/bin/rdebug-ide
--disable-int-handler
--evaluation-timeout 10
--rubymine-protocol-extensions
--port 53952
--host 0.0.0.0
--dispatcher-port 53953 -- /Users/gerardoparajeles/Documents/SmashAnalytics/brain/cerebrum/cerebrum.rb
Fast Debugger (ruby-debug-ide 0.6.1.beta2, debase 0.2.2.beta8, file filtering is supported) listens on 0.0.0.0:53952
I, [2016-10-06 18:46:05#1539] INFO -- : Cerebrum waking...
I wasn't able to get it to work other than happy path but that's all I had time to make it work with, after I found out that another PS fixed the first issue I was having. Here are my steps:
1. valid sync https://portaluat.browardschools.com/Pinnacle/Gradebook/
2. in canvas course sis id: df440636-58a1-4c49-bd62-545eab0d65ce~d55ea3ea-bd93-402a-8aaa-eed1efaf0163~05a2036e-25f1-4d4b-84a1-261f62741da5
- i'm not sure if that matters so i did try a few different variations and with no value just to make sure
3. make sure there is a section sis id that lines up with a class in the correct course if it applies. the term and due dates were checked in a similar fashion.
4. create two assignments graded by points. (bare with me)
5. give students grades (there are many so give many grades)
6. edit one of the assignments to be not graded
7. post grades
8. validate every piece of data you can possibly link to figure out if it worked.
[83204ca0-6960-43e5-acca-20c22bb78c83] APIToken Load (0.7ms) SELECT "api_tokens".* FROM "api_tokens" WHERE "api_tokens"."agent_id" = $1 LIMIT 1 [["agent_id", 2]]
[83204ca0-6960-43e5-acca-20c22bb78c83] Rendered agents/_render_edit_fields.erb (1.9ms)
[83204ca0-6960-43e5-acca-20c22bb78c83] Rendered agents/_render_edit_fields.erb (0.1ms)
[83204ca0-6960-43e5-acca-20c22bb78c83] Rendered agents/_render_edit_fields.erb (0.1ms)
[83204ca0-6960-43e5-acca-20c22bb78c83] Rendered agents/_render_edit_fields.erb (0.1ms)
[83204ca0-6960-43e5-acca-20c22bb78c83] Rendered agents/_render_edit_fields.erb (0.2ms)
[83204ca0-6960-43e5-acca-20c22bb78c83] Rendered agents/_render_edit_fields.erb (0.1ms)
[83204ca0-6960-43e5-acca-20c22bb78c83] Rendered agents/custom_fields/_obscured_input.erb (0.7ms)
[83204ca0-6960-43e5-acca-20c22bb78c83] Rendered agents/_render_edit_fields.erb (1.9ms)
[83204ca0-6960-43e5-acca-20c22bb78c83] Rendered agents/_render_edit_fields.erb (0.2ms)
curl https://portaluat.browardschools.com/Pinnacle/Gradebook/learningdata/v1/classes/3513.0.01?parameters.limit=1000&parameters.offset=1000
[1] 35739
-bash: parameters.offset=1000: command not found
adam-l:sis_app adam$ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>404 - File or directory not found.</title>
<style type="text/css">
<!--
@adam-phillipps
adam-phillipps / gist:61e311304048800f78a04894a639d691
Last active September 6, 2016 05:55
output from java -jar -DmodelIndex=“0” -DuseLocalFiles=false roas-simulator-1.0.jar
java -jar -DmodelIndex=“0” -DuseLocalFiles=false roas-simulator-1.0.jar
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.4.0.RELEASE)
Failed Job! {"instanceId":"i-e9e3b3f1","identity":"6","url":"ip-172-31-33-90.us-west-2.compute.internal","type":"SitRep","content":"job_finished","extraInfo":{"job":{"identity":"6","task_type":"Demo"},"run_time":21,"results":"","errors":"\n . ____ _ __ _ _\n /\\\\ / ___'_ __ _ _(_)_ __ __ _ \\ \\ \\ \\\n( ( )\\___ | '_ | '_| | '_ \\/ _` | \\ \\ \\ \\\n \\\\/ ___)| |_)| | | | | || (_| | ) ) ) )\n ' |____| .__|_| |_|_| |_\\__, | / / / /\n =========|_|==============|___/=/_/_/_/\n :: Spring Boot :: (v1.4.0.RELEASE)\n\n2016-09-06 01:51:58.849 INFO 1226 --- [ main] com.smashanalytics.main.Application : Starting Application v1.0 on ip-172-31-33-90 with PID 1226 (/home/ubuntu/crawler/roas-simulator-1.0.jar started by root in /home/ubuntu/crawler)\n2016-09-06 01:51:58.860 INFO 1226 --- [ main] com.smashanalytics.main.Application : No active profile set, falling back to default profiles: default\n2016-09-06 01:51:59.109 INFO 1226 --- [ main]
@adam-phillipps
adam-phillipps / roas-simulator-1.0.jar
Created September 6, 2016 01:11
error from `java -jar -DmodelIndex=“0” -DuseLocalFiles=false roas-simulator-1.0.jar`
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.4.0.RELEASE)