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
# CartPole-v0 | |
# A pole is attached by an un-actuated joint to a cart, | |
# which moves along a frictionless track. The system | |
# is controlled by applying a force of +1 or -1 to the | |
# cart. The pendulum starts upright, and the goal is to | |
# prevent it from falling over. A reward of +1 is provided | |
# for every timestep that the pole remains upright. | |
# The episode ends when the pole is more than 15 degrees | |
# from vertical, or the cart moves more than 2.4 units from |
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 React, { createContext, useReducer } from 'react'; | |
import * as types from 'constants/actionTypes'; | |
const LoginContext = createContext(); | |
const initialState = { | |
isLoggedIn: false, | |
token: null, | |
loading: false, | |
error: null, |
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 React, { useContext } from 'react'; | |
import { LoginContext } from "contexts/LoginContext"; | |
... | |
const signIn = async values => { | |
const loginContext = useContext(LoginContext); | |
try { | |
const { email, password } = values; | |
loginContext.actions.loginLoading(); |
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 React from 'react'; | |
import { LoginContextProvider } from 'contexts'; | |
const App = () => { | |
return ( | |
<LoginContextProvider> | |
{/* Your Application Content Goes in here */} | |
</LoginContextProvider> | |
); | |
}; |
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 { Avalanche, BinTools, Buffer, BN } from "avalanche"; | |
import { | |
AVMAPI, | |
KeyChain as AVMKeyChain, | |
UTXOSet, | |
UnsignedTx, | |
Tx, | |
MinterSet, | |
AVMConstants, | |
UTXO, |