Skip to content

Instantly share code, notes, and snippets.

View cloudinertia's full-sized avatar

robbie cloudinertia

  • Opensource Contributor
  • Seoul, Republic of Korea
  • X @orobbie
View GitHub Profile
// runtime = node.js v4
var under = require('underscore')
///example data
var capacities = [20,20]
var bottles = [5,8]
var fromId = [0]
var toId = [1]
///
#include <iostream>
#include<string>
using namespace std;
/*
Top coder 4-palindrome
Palindrome?
"adda", "aaabbbaaa" ... read same backward or forward.
ThePalindrome interface
@cloudinertia
cloudinertia / marking_script.py
Created May 8, 2017 19:17
python shell test script
"""
author: oyt311@hanmail.net
license: MIT
조교중, 파이썬 채점 스크립트 만들다가 만 부산물. 파이썬 버전 3 기준!
"""
import subprocess as sub
from subprocess import PIPE
import shlex
{
"nodes": [
{
"id":"A",
"group":1
},
{
"id":"B",
"group":2
},
{
"nodes":
[
{"id":"student1","group":1},{"id":"student2","group":1},{"id":"student3","group":1},{"id":"student4","group":1},{"id":"student5","group":1},{"id":"student6","group":1},{"id":"student7","group":1},
{"id":"student8","group":2},{"id":"student9","group":2},{"id":"student10","group":2},{"id":"student11","group":2},
{"id":"student12","group":3},{"id":"student13","group":3},
{"id":"student14","group":4},{"id":"student15","group":4},{"id":"student16","group":4},
{"id":"student17","group":5},{"id":"student18","group":5},{"id":"student19","group":5},{"id":"student20","group":5},{"id":"student21","group":5},{"id":"student22","group":5},
{"id":"student23","group":6},
{"id":"student24","group":7},{"id":"student25","group":7},{"id":"student26","group":7},{"id":"student27","group":7},{"id":"student28","group":7},
Transfer: event({_from: indexed(address), _to: indexed(address), _value: uint256})
Approval: event({_owner: indexed(address), _spender: indexed(address), _value: uint256})
name: public(string[20])
symbol: public(string[5])
decimals: public(uint256)
balances: map(address, uint256)
allowances: map(address, map(address, uint256))
total_supply: uint256
minter: address
pragma solidity >=0.4.21 <0.6.0;
import "./ERC20.sol";
contract TutorialToken is ERC20 {
string public name = "TutorialToken";
string public symbol = "TT";
uint public decimals = 18;
uint public INITIAL_SUPPLY = 20000*10**18;