Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#Instead of x and o players are 1 and -1 | |
def eval(board): #returns 1 if player 1 wins, 0 if no player wins, -1 if player -1 wins | |
for i in range(3): | |
if board[i*3] == board [i*3 + 1] == board[i*3 +2] and board[i*3]!=0: #Horizontal | |
return board[i*3] | |
if board[i] == board[i+3] == board [i+6] and board[i*3]!=0: #Vertical | |
return board[i] | |
if board[0] == board[4] == board[8] and board[0]!=0: #Diagonal 1 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#Misinformation Classication with GPT-4 | |
from langchain.agents import load_tools | |
from langchain.agents import initialize_agent | |
from langchain.llms import OpenAI | |
from langchain.chat_models import ChatOpenAI | |
from langchain import SerpAPIWrapper | |
from langchain.document_loaders import WebBaseLoader | |
from langchain.tools import tool | |
import requests |
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 java.util.Arrays; | |
public class NN { | |
private final int featuresize; | |
private final int hiddenSize; | |
private final int outputSize; | |
private double[][] weights1; | |
private double[][] weights2; | |
private double[] hiddenLayer; |