Skip to content

Instantly share code, notes, and snippets.

View kylewu's full-sized avatar
:octocat:
On vacation

Wenbin Wu kylewu

:octocat:
On vacation
View GitHub Profile
{
"id": "48993b54:171f4133b7b:33af",
"result": {
"success": true,
"status": 200,
"metadata": null,
"content": [
{
"userId": 22678883,
"traitId": "hobby",
@kylewu
kylewu / sample-client-search.json
Created April 14, 2020 10:04
sample client search
{
"information": {
"messages": [],
"hasError": false,
"hasException": false,
"developerMessage": null
},
"data": [
{
"client": {
@kylewu
kylewu / test.py
Created April 17, 2018 18:40
multiprocessing pool
from multiprocessing import Pool
class Test(object):
def __init__(self):
self.array = []
def task(self, n):
self.array.append(n)
print(self.array)
### Keybase proof
I hereby claim:
* I am kylewu on github.
* I am wwu (https://keybase.io/wwu) on keybase.
* I have a public key ASDyWNRUxFbPeZDj7VECl5O-c6C-ixdAX5NokGtb5knlcgo
To claim this, I am signing this object:
@kylewu
kylewu / crowdsale.sol
Created November 4, 2017 22:10
ETH tutorial crowdsale
pragma solidity ^0.4.16;
interface token {
function transfer(address receiver, uint amount);
}
contract Crowdsale {
address public beneficiary;
uint public fundingGoal;
@kylewu
kylewu / improved-token.sol
Last active November 4, 2017 21:54
ETH tutorial improved token
pragma solidity ^0.4.16;
contract owned {
address public owner;
function owned() public {
owner = msg.sender;
}
modifier onlyOwner {
@kylewu
kylewu / first-token.sol
Last active November 4, 2017 21:38
ETH tutorial first token
pragma solidity ^0.4.16;
contract FirstToken {
string public name;
string public symbol;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
event Transfer(address indexed from, address indexed to, uint256 value);
0x98E972148C2C4970eF80F7A58a4C34761E4643BE
@kylewu
kylewu / install.sh
Created March 10, 2017 10:22
preparation for BTrace on ec2
# oracle jdk
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jdk-8u121-linux-x64.rpm
sudo yum install -y jdk-8u121-linux-x64.rpm
# btrace
mkdir btrace
cd btrace
wget https://github.com/btraceio/btrace/releases/download/v1.3.9/btrace-bin-1.3.9.tgz
tar zxvf btrace-bin-1.3.9.tgz
@kylewu
kylewu / test.py
Created February 2, 2016 09:11
test menu
class Menu(object):
def __init__(self, name, cls):
self.menu_items = []
self.name = name
self.cls = cls
def add_item(self, name, cls):
for i in self.menu_items:
if i.name == name:
raise Exception('already exist')