Skip to content

Instantly share code, notes, and snippets.

View tinybike's full-sized avatar

Jack Peterson tinybike

  • Merica
View GitHub Profile
% price cap
xi = 0.3;
% LMSR
beta = 1;
q = 10*ones(1,5);
i = 1;
qj = [q(1:i-1) q(i+1:end)];
n = -q(i) + log(xi*sum(exp(beta*qj))/(1 - xi)) / beta
q(i) = q(i) + n;
#!/usr/bin/env python
from ethereum import tester
s = tester.state()
c = s.abi_contract("sha3-example.se")
print hex(c.makeMarketID())
In [2]: from ethereum import tester
In [3]: s = tester.state()
In [4]: c = s.abi_contract("../serpent-scripts/concat.se")
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
<ipython-input-4-3c4f0dc254a5> in <module>()
----> 1 c=s.abi_contract("../serpent-scripts/concat.se")
/home/jack/src/pyethereum/ethereum/tester.py in abi_contract(self, sourcecode, sender, endowment, language, log_listener, listen, libraries, path, constructor_parameters, **kwargs)
221 path,
#!/usr/bin/env python
# @author Chris Calderon (calderon.christian760@gmail.com)
from ethereum import tester as t
code1 = '''data muhState[]
data muhLen[]
def get(i):
return(load(self.muhState[i], items=self.muhLen[i]):arr)
#!/usr/bin/env python
from decimal import *
base_binary = Decimal(2)**Decimal(64)
base_decimal = Decimal(10)**Decimal(20)
def fix_binary(n):
return Decimal(n) * base_binary
#!/usr/bin/env node
var W3CWebSocket = require("websocket").w3cwebsocket;
var websocket = new W3CWebSocket("ws://127.0.0.1:8546");
websocket.onerror = function () {
console.log("websocket error :(");
};
websocket.onclose = function () {
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x95c9bb]
goroutine 635024 [running]:
github.com/ethereum/go-ethereum/eth/filters.(*Filter).Find(0xc88d1777a0, 0x0, 0x0, 0x0)
/home/deploy/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/filters/filter.go:83 +0x15b
github.com/ethereum/go-ethereum/eth/filters.(*PublicFilterAPI).GetLogs(0xc820176dc0, 0x1, 0xffffffffffffffff, 0xc8b5f82300, 0x1, 0x1, 0xc822fdc7e0, 0x4, 0x4, 0x0, ...)
/home/deploy/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/filters/api.go:441 +0x158
reflect.Value.call(0xd75540, 0xf52000, 0x13, 0xf9e438, 0x4, 0xc835952000, 0x2, 0x2, 0x0, 0x0, ...)
/usr/lib/go/src/reflect/value.go:432 +0x120a
@tinybike
tinybike / terminator.config
Last active October 21, 2024 13:28
~/.config/terminator/config
[global_config]
suppress_multiple_term_dialog = True
title_transmit_bg_color = "#c00909"
[keybindings]
[layouts]
[[default]]
[[[child0]]]
fullscreen = False
last_active_term = f6492e56-7053-4ce3-8780-d71bd7ae0843
last_active_window = True
package main
import (
"encoding/json"
"fmt"
"net"
)
func main() {
fuckedString := "00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000001a17000000000000000000000000000000000000000000000000000000000000004b000000000000000000000000000000000000000000000000000000000000004d12c1d0f7ecb396bf326ff525a67c00274484eaf5c380db5fa67ed1338d45bced00000000000000000000000000000000000000000000000000000000000021a100000000000000000000000000000000000000000000000000470de4df8200000000000000000000000000000000000000000000000000000000000058a9468e000000000000000000000000000000000000000000000018650127cc3dc8000074657374696e67000000000000000000000000000000000000000000000000007265706f7274696e67000000000000000000000000000000000000000000000062696e61727900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000058ab830100000000000000000000000000000000000000000000000006f05b59d3b20000f783c6b97161dc09ea132713461
@tinybike
tinybike / gist:47a18742cb118f748f894b2132b2449b
Last active June 16, 2017 20:48
0x05ae1d0ca6206c6168b42efcd1fbe0ed144e821b
0x05ae1d0ca6206c6168b42efcd1fbe0ed144e821b