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 aocd import data, submit | |
import re | |
exampleA = """ | |
Game 1: 3 blue, 4 red; 1 red, 2 green, 6 blue; 2 green | |
Game 2: 1 blue, 2 green; 3 green, 4 blue, 1 red; 1 green, 1 blue | |
Game 3: 8 green, 6 blue, 20 red; 5 blue, 4 red, 13 green; 5 green, 1 red | |
Game 4: 1 green, 3 red, 6 blue; 3 green, 6 red; 3 green, 15 blue, 14 red | |
Game 5: 6 red, 1 blue, 3 green; 2 blue, 1 red, 2 green | |
""" |
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
void FSM::buildTrie() | |
{ | |
int newState = 1; | |
for (size_t i = 0; i < this->strings.size(); ++i) { | |
std::string s = this->strings[i]; | |
extend(s, &newState); | |
} | |
for (size_t i = 0; i < MAX_CHAR; ++i) { |
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 org.junit.internal.runners.statements; | |
import org.junit.internal.AssumptionViolatedException; | |
import org.junit.runners.model.Statement; | |
import com.ibm.jit.JITHelpers; | |
public class ExpectException extends Statement { | |
private final Statement next; | |
private final Class<? extends Throwable> expected; | |
public ExpectException(Statement next, Class<? extends Throwable> expected) { |
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 OpenAI = require('openai-api'); | |
const openai = new OpenAI(process.env.OPEN_AI_API_KEY); | |
const formatToInput = (body) => { | |
const context = ` | |
This is a LinkedIn Bio Generator | |
Name: John | |
Student: Yes | |
Degree: Bachelor’s of Commerce |