This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mapping (address => mapping (bytes32 => bool)) public orders; | |
mapping (address => mapping (bytes32 => uint)) public orderFills; | |
function trade(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s, uint amount) { | |
bytes32 hash = sha256(this, tokenGet, amountGet, tokenGive, amountGive, expires, nonce); | |
if (!( | |
(orders[user][hash] || ecrecover(sha3("\x19Ethereum Signed Message:\n32", hash),v,r,s) == user) && | |
block.number <= expires && | |
safeAdd(orderFills[user][hash], amount) <= amountGet | |
)) throw; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mapping (address => mapping (address => uint)) public tokens; | |
function deposit() payable { | |
tokens[0][msg.sender] = safeAdd(tokens[0][msg.sender], msg.value); | |
Deposit(0, msg.sender, msg.value, tokens[0][msg.sender]); | |
} | |
function withdraw(uint amount) { | |
if (tokens[0][msg.sender] < amount) throw; | |
tokens[0][msg.sender] = safeSub(tokens[0][msg.sender], amount); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setSeed() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = ss.getSheets()[0]; | |
var cell = sheet.getRange(ss.getRangeByName('SEED').getA1Notation()); | |
cell.setValue(Date.now()); | |
} | |
function onOpen() { | |
setSeed() | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loc_00000000: | |
0x00000000 60 60 PUSH1 60 | |
0x00000002 60 40 PUSH1 40 | |
0x00000004 52 MSTORE | |
0x00000005 60 04 PUSH1 04 | |
0x00000007 36 CALLDATASIZE | |
0x00000008 10 LT | |
0x00000009 61 6c 00 PUSH2 6c 00 | |
0x0000000c 57 JUMPI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying my Blockstack ID is secured with the address 1KuRN2DXQX86WsU5egTmAnP91UBMxbhXFe https://explorer.blockstack.org/address/1KuRN2DXQX86WsU5egTmAnP91UBMxbhXFe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
import os | |
import json | |
import subprocess | |
from scipy.misc import imread, imresize | |
from scipy import misc | |
from train import build_forward | |
from utils.annolist import AnnotationLib as al | |
from utils.train_utils import add_rectangles, rescale_boxes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const React = require('react') | |
const ReactDOM = require('react-dom') | |
const Api = require('./../../utils/Api') | |
const LoadingIndicator = require('./../common/LoadingIndicator') | |
const Dialog = require('./../common/Dialog') | |
const Dropzone = require('react-dropzone') | |
const async = require('async') | |
export default class UploadImagesDialog extends React.Component { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Example service definition for Twitter | |
*/ | |
{ | |
id: 'twitter', | |
name: 'Twitter', | |
url: 'http://twitter.com/', | |
siteName: 'Twitter.com', | |
rest: { | |
// Global REST configurations that are inherited by all subsequent definitions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ provider: | |
{ id: 'facebook', | |
displayName: 'Facebook', | |
url: 'http://facebook.com/' }, | |
published: '2011-06-29T14:56:58+0000', | |
actor: | |
{ objectType: 'person', | |
id: '653038898', | |
displayName: 'Justin McCurry', | |
image: { url: 'https://graph.facebook.com/653038898/picture' } }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.convertTwitterError = function(error_str) { | |
if(typeof error_str == 'object') { | |
var code = 500; | |
if(error_str.code) { | |
code = error_str.code; | |
} | |
if(error_str.status) { | |
code = error_str.status; | |
} | |
if(error_str.statusCode) { |