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 repositories in an organization from a list | |
# Add people from the list to their repositories | |
# by Bowen Song | |
# Input List File Format: | |
# <repository name> | <Member username/email> | <role> | |
# ceph-end-to-end-tracing bowenislandsong member | |
# $ pip install PyGithub |
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 |
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 os | |
from os import listdir | |
from os.path import isfile, join | |
def writeline(f_name,line): | |
f = open(f_name,'a') | |
line = line.replace("$", "") | |
f.write(line) |
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
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
#!/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
# 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
// 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
%% 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"); |
OlderNewer