Skip to content

Instantly share code, notes, and snippets.

View Bowenislandsong's full-sized avatar

Bowen Song Bowenislandsong

  • USC
View GitHub Profile
@Bowenislandsong
Bowenislandsong / trojancheck.js
Last active January 5, 2022 22:23
Add the following to book mark for easy trojancheck clicking. Trojancheck always change the question layout, this code needs to be updated accordingly. To use it, create a book mark with this js script. Navigate to trojancheck page and click this bookmark till the last page (~4 clicks).
javascript: (() => {
if (location.href=="https://trojancheck.usc.edu/login"){
document.querySelector('[aria-label="Log in with your USC NetID"]').click();
}
else if (location.href=="https://trojancheck.usc.edu/consent"){
document.querySelector('.submit-button').click();
}
else if (location.href=="https://trojancheck.usc.edu/dashboard"){
document.querySelector('.btn-begin-assessment').click();
}
@Bowenislandsong
Bowenislandsong / Graph_3d_steps.py
Created March 15, 2022 21:54
This graph generator plots different step signals and show them in a 3d plot with colorful views.
from matplotlib import pyplot as plt
from matplotlib.collections import PolyCollection
import numpy as np
# Graph Auxilary
'''
Graph_runsteps_3D super positions different running step signals and show them on the same
timeline. Each signal has a different color and provide a general view of the signals.
mtx_time: time of a signal. (optional) If black, plot them by samples. Dimention should be the same as mtx_signal
mtx_signal: array of signals. Each run step is represented by a array of values (signal). The mtx layout is run-step X signal.