Skip to content

Instantly share code, notes, and snippets.

View tina1998612's full-sized avatar
:octocat:
DigitalNomad

李婷婷 Lee Ting Ting tina1998612

:octocat:
DigitalNomad
View GitHub Profile
0x4f50e53ce7e1c362deee60f73c5e72210016c809
const uint64_t MAX_ROOM_WAIT_TIME = 2 * 60 * 1000; // 2 mins
const uint8_t MAX_PLAYERS = 5;
enum game_status : uint8_t { INIT = 0, ONGOING = 1, TIMEOUT = 2 };
enum card_type : uint8_t {
EMPTY = 0, // Represents empty slot in hand
SPADE = 1,
HEART = 2,
DIAMOND = 3,
[
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
pragma solidity >=0.5.0 <0.6.0;
pragma experimental ABIEncoderV2;
import "./openzeppelin-solidity/math/SafeMath.sol";
contract InfinityGame {
using SafeMath for uint256;
using SafeMath for uint8;
uint8 constant public numberOfPlayer = 5;
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreig36fez6pcz3hwgbkuhtojrmwo3v2yo2idyla6c3rfo5vqznt3rbq ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
from __future__ import print_function
import pandas as pd
import ccxt
import datetime
from pyalgotrade import strategy
from pyalgotrade.barfeed import quandlfeed, csvfeed
from pyalgotrade.technical import ma
from pyalgotrade.bar import Frequency
from pyalgotrade.stratanalyzer import returns, trades
from pyalgotrade import plotter
pragma solidity >=0.7.0 <0.9.0;
contract Storage {
uint256 number;
function store(uint256 num) public {
number = num;
}
stored_data: uint256
@public
def set(new_value : uint256):
self.stored_data = new_value
@public
@constant
def get() -> uint256:
return self.stored_data
stored_data: uint256
@public
def set(new_value : uint256):
self.stored_data = new_value
@public
@constant
def get() -> uint256:
return self.stored_data
use solana_program::{
account_info::{next_account_info, AccountInfo},
entrypoint,
entrypoint::ProgramResult,
msg,
program_error::ProgramError,
pubkey::Pubkey,
};
entrypoint!(process_instruction);