|
Download lang/chain001.jsonl from winapiadmin/tinycodinglm: direct link, hf CLI and curl.
- Browser
- Download file 2.36 kB
-
https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/main/lang/chain001.jsonl
- Command line
-
hf download hf://datasets/winapiadmin/tinycodinglm/lang/chain001.jsonl
-
curl -L -o chain001.jsonl https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/main/lang/chain001.jsonl
2.36 kB
| {"type": "session", "harness": "deepseek-harness", "id": "chain001", "name": "Solidity smart contracts"} | |
| {"type": "message", "message": {"role": "system", "content": "You are an expert software engineer and technical assistant. You provide accurate, detailed, and practical answers. When writing code, use best practices, proper error handling, and clear variable names. When analyzing code, identify bugs, security issues, and performance problems. You have deep knowledge of C/C++, Windows API, Python, and many other technologies."}} | |
| {"type": "message", "message": {"role": "user", "content": "How do I write a Solidity smart contract?"}} | |
| {"type": "message", "message": {"role": "assistant", "content": "```solidity\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.20;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ncontract MyToken is ERC20, Ownable {\n uint256 public constant MAX_SUPPLY = 1000000 * 10**18;\n mapping(address => bool) public blacklisted;\n\n constructor() ERC20(\"MyToken\", \"MTK\") Ownable(msg.sender) {\n _mint(msg.sender, MAX_SUPPLY);\n }\n\n function transfer(address to, uint256 amount) public override returns (bool) {\n require(!blacklisted[msg.sender], \"Blacklisted\");\n require(!blacklisted[to], \"Recipient blacklisted\");\n return super.transfer(to, amount);\n }\n\n function blacklist(address account) external onlyOwner {\n blacklisted[account] = !blacklisted[account];\n }\n\n function burn(uint256 amount) external {\n _burn(msg.sender, amount);\n }\n}\n\n// Events\nevent Transfer(address indexed from, address indexed to, uint256 value);\n\n// Modifier\nmodifier onlyWhitelisted() {\n require(whitelisted[msg.sender], \"Not whitelisted\");\n _;\n}\n\n// Reentrancy guard\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\ncontract Vault is ReentrancyGuard {\n mapping(address => uint256) public balances;\n\n function deposit() external payable nonReentrant {\n balances[msg.sender] += msg.value;\n }\n\n function withdraw(uint256 amount) external nonReentrant {\n require(balances[msg.sender] >= amount);\n balances[msg.sender] -= amount;\n payable(msg.sender).transfer(amount);\n }\n}\n```"}} | |