Skip to content

Instantly share code, notes, and snippets.

View devdattakhoche's full-sized avatar
:octocat:
Focusing

Devdatta Khoche devdattakhoche

:octocat:
Focusing
View GitHub Profile
@devdattakhoche
devdattakhoche / gist:fe3454939275ff308a1adfc118f6d6b9
Last active August 8, 2023 07:53
Progress based Reward Function
def reward_function(params)
reward = 1.0
wheels = params["all_wheels_on_track"]
steps = params["steps"]
progress = params["progress"]
speed = params["speed"]
if wheels and steps > 0:
reward += (( progress / steps) * 100) + (speed**2)
else:
@devdattakhoche
devdattakhoche / CustomERC20.sol
Last active January 10, 2022 14:14
This is general template for creating your own custom erc20 token.
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0 <0.8.0;
interface ERC20{
function balanceOf(address _owner) external view returns (uint256 balance);
function transfer(address _to, uint256 _value) external returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);
function approve(address _spender , uint256 _value) external returns (bool success);
function allowance(address _owner, address _spender) external view returns (uint256 remaining);
@devdattakhoche
devdattakhoche / 1-Python Workshop
Last active October 4, 2020 08:03
Made by Devdatta Khoche
Python Workshop-ISTE-VESIT