from youtube_api import YouTubeDataAPI
# Set the API key
API_KEY=""
yt = YouTubeDataAPI(API_KEY)
# Channel IDs
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
#include <stdio.h> | |
#include <stdlib.h> | |
int main( int argc, char** argv) { | |
char toLower[1000]; | |
fgets(toLower, sizeof(toLower), stdin); | |
for (int i = 0; toLower[i] != '\0'; i ++) { | |
if (toLower[i] > 64 && toLower[i] < 91) { | |
printf("%c", toLower[i] + 32); |
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
#include <stdio.h> | |
int main() { | |
// initialize input array and int array holding offending lines | |
char lines[1000]; | |
int offend[100] = {0}; | |
// initialize counter for number of offending lines and the current lineNum | |
int oLines = 0; | |
int lineNum = 0; |
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
const AWS = require('aws-sdk'); | |
// Configure the AWS SDK with your IAM user's credentials | |
AWS.config.update({ | |
accessKeyId: 'YOUR_ACCESS_KEY_ID', | |
secretAccessKey: 'YOUR_SECRET_ACCESS_KEY', | |
region: 'us-east-1' // Replace with your desired AWS region | |
}); | |
const sts = new AWS.STS(); |
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
package a6; | |
import java.util.*; | |
public class GraphImpl implements Graph { | |
Map<String, Node> nodes; //Do not delete. Use this field to store your nodes. | |
// key: name of node. value: a5.Node object associated with name | |
private int n; | |
private int e; |
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
public void insert(int p){ | |
//Hint: remember to update size. Also, remember that we skip index 0 in the array. | |
/*Your code here */ | |
if (this.size == 0) { | |
// if array is empty | |
elts[1] = p; | |
} else if (this.size != max) { | |
// if the size isn't already at max | |
// set spot at the end of heap to new value |
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
package a3; | |
public class Main { | |
public static void main(String[] args){ | |
/* | |
* You will test your own bst implementation in here. | |
* Do what you wish to in Main, as we will not be running it. | |
* The grader uses its own Main and calls the methods of your other classes. |
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
package a3; | |
public class Tester { | |
public void merge (BST ot) { | |
BST nt = new BSTImpl(); | |
int[] v1 = new int[]{55,25,105,45,1135,15}; | |
for (int v:v1) { ot.insert(v); } | |
int[] v2 = new int[]{5,3,8,2,6,1,9,4}; | |
for (int v:v2) { nt.insert(v); } |
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 | |
def lambda_handler(event, context): | |
# Get the RGB value from the event object (parameter) | |
rgb = event["queryStringParameters"]["rgb"] | |
# Split the RGB value into separate red, green, and blue values | |
split_rgb = rgb.split(',') | |
# Access each hex value by indexes |
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 csv | |
import urllib.request | |
import re | |
import time | |
rows = [] | |
# regex function (finds twitter handle) | |
def getHandle(pattern, html): | |
result = re.findall(pattern, html) | |
return result[0][1] |
NewerOlder