Skip to content

Instantly share code, notes, and snippets.

View yhuag's full-sized avatar
:octocat:
BUIDL

HU Yao-Chieh yhuag

:octocat:
BUIDL
View GitHub Profile
import pandas as pd
import textwrap
import csv
# Configs
MAX_CHAR_LEN = 133
INPUT_FILE_NAME = "/Users/yao-chiehhu/Downloads/AICUP_DATA.csv"
OUTPUT_FILE_NAME = "/Users/yao-chiehhu/Downloads/AICUP_OUTPUT.csv"
data = pd.read_csv(INPUT_FILE_NAME)
@yhuag
yhuag / JD_GH&GP_TuringCerts.md
Last active January 28, 2020 08:44
[Job Description] Growth Hacker & Global Partnerships - TuringCerts Recruitment 2020

Imgur

TuringCerts Recruitments


Our Company

TuringCerts (English Official / 中文官方) is a Decentralized Smart Citizen Identifier Network for credential endorsements and proof of evidence, such as university diplomas and professional work history, that guarantees the integrity of records and makes verification more efficient than the conventional.

TAGLINE: Your Blockchain-based Resume for One-click Verify.


pragma solidity ^0.5.0;
import "https://github.com/OpenZeppelin/openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol";
import "https://github.com/OpenZeppelin/openzeppelin-solidity/contracts/token/ERC20/ERC20.sol";
/**
* @title SimpleToken
* @dev Very simple ERC20 Token example, where all tokens are pre-assigned to the creator.
* Note they can later distribute these tokens as they wish using `transfer` and other
pragma solidity ^0.4.24;
contract FinalDecision {
mapping (uint => bool) alreadyDrawed;
uint public drawed;
uint[] public teams;
function rand() public{
uint _team = uint(keccak256(now)) % 7 + 1;
pragma solidity ^0.4.21;
contract Random {
function getBlockNum() public constant returns (uint) {
return block.number;
}
function getNow() public constant returns (uint) {
return now;
}
contract MerchantPayable {
enum Role {Client, Merchant, Owner}
mapping (address => Role) public addressToRole;
mapping (bytes32 => bool) public paymentSettled;
mapping (bytes32 => bool) public paymentIssued;
uint256 nonce;
pragma solidity ^0.4.13;
contract Paybale {
address owner;
constructor () {
owner = msg.sender;
}
mapping (address => uint) balances;
@yhuag
yhuag / Freezable.sol
Created October 24, 2018 03:55
Tested Freezable Contract
pragma solidity ^0.4.25;
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
@yhuag
yhuag / DelegateCall.sol
Created August 11, 2018 10:35
Delegate call to Math with Solidity "delegatecall"
pragma solidity ^0.4.24;
contract Math {
// Answer
uint public ans;
// Module #0
function plus(uint _n1, uint _n2) public { ans = _n1 + _n2; }
// Module #1
function minus(uint _n1, uint _n2) public { ans = _n1 - _n2; }
// Module #2