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
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. |
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
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(); | |
} |
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
%% Graph IBLT | |
clear all | |
close all | |
t=csvread("./setDiff_iblt.txt"); | |
i=csvread("./setDiff_intercpi.txt"); | |
samples = 50; | |
dataLength = 50; | |
plotIBLTPerf_diff(t,i,samples,dataLength,"Communication and Time Cost vs. Diffrences Between 2 DB"); |
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
// Project trigger is available in UI. | |
function SendEmail() { | |
var agendaSheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0]; | |
var emailTempSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Email Template") | |
var startRow = 2; | |
var emailTemp = emailTempSheet.getDataRange().getValues() | |
var address = emailTemp[0][1] | |
var subject = emailTemp[1][1] | |
var meetingTP = emailTemp[2][1] |
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
# have raw-pull-secret by Visit https://cloud.redhat.com/openshift/install/aws/installer-provisioned for aws pull-secret | |
# Login to OC using https://api.ci.openshift.org/ and upper right corner you'll see the dropdown to Command Line Tools that'll give you an oc login command to cp/paste in your terminal. | |
cp raw-pull-secret pull-secret | |
oc registry login --to=pull-secret | |
tr -d ' \t\n\r\f' <pull-secret >openshift-pull-secrets.yaml | |
pullsecret=`cat openshift-pull-secrets.yaml` | |
sed -i "/^\([[:space:]]*pullSecret: \).*/s//\1'${pullsecret}'/" install-config.yaml |
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
#!/bin/bash | |
# make a dir with time | |
dir_name="olm_$(date +"%m_%d-%T")" | |
mkdir "$dir_name" | |
for pod_name in $(oc get pods -n olm | awk 'NR>1 {print $1}') | |
do | |
oc logs --all-containers $pod_name -n olm > "$dir_name/$pod_name.txt" | |
done |
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 test "github.com/openshift/windows-machine-config-operator/tools/windows-node-installer/pkg/cloudprovider/aws" | |
func getInstance(a *test.awsProvider, instanceID string) (*ec2.Instance, error) { | |
instances, err := a.EC2.DescribeInstances(&ec2.DescribeInstancesInput{ | |
InstanceIds: aws.StringSlice([]string{instanceID}), | |
}) | |
if err != nil { | |
return nil, err | |
} |
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
#!/bin/bash | |
# move content of clusterN to cluster dir and destroy cluster | |
# cp install-config from current dir to clusterN and edit cluster name with random suffix | |
# create the OpenShift Cluster there. | |
# Pre-req: dir(cluster, clusterN), installer-config.yaml, and openshift-install binary. | |
rm -rf cluster/* | |
mv clusterN/* cluster/ | |
./openshift-install destroy cluster --dir cluster & | |
cp install-config.yaml clusterN/ | |
nameSufix=$RANDOM % 100000 | bc |
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
# we edit the grades off-line from blackboard | |
# we assume the combination of Student ID and BU emails as unique and valid identity (either should do) | |
# group assignment list should be with this script | |
# Mode 1: | |
# we input csv files for grade assignments | |
# Mode 2: | |
# we input a grade for a group | |
import csv | |
import os | |
import copy as c |
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
# Creating projects in Taiga from a list | |
# Add people from the list to their projects | |
# by Bowen Song | |
# Input List File Format: | |
# <Project name> | <Member username/email> | |
# $ pip install PyGithub | |
# use Normal Access |
NewerOlder