Skip to content

Instantly share code, notes, and snippets.

View palango's full-sized avatar

Paul Lange palango

View GitHub Profile
# Double digest problem
# Paul Lange
# length 10000 - 24 solutions
# a = [5976, 1543, 1319, 1120, 42];
# b = [4513, 2823, 2057, 607];
# c = [4513, 1543, 1319, 1120, 607, 514, 342, 42];
# length 20000 - 72 solutions
# a = [8479, 4868, 3696, 2646, 169, 142];
# constants
const beta = 0.5
const eta = 0.01
function activation (b)
return tanh(beta*b)
end
function activation_prime (b)
return beta*(sech(beta*b).^2)
0x5a3b85ece0056aab6de2ab163ca34ef38838365b
@palango
palango / test
Created November 20, 2017 14:47
Raiden Network Individual Contributor License Agreement
Thank you for your interest in contributing to Raiden Network ("We" or "Us").
contributor agreement ("Agreement") documents the rights granted by contributors to Us. To make this document effective, please sign it and send it to Us by electronic submission, following the instructions at https://github.com/raiden-network/raiden/blob/master/CONTRIBUTING.md. This is a legally binding document, so please read it carefully before agreeing to it. The Agreement may cover more than one software project managed by Us.
1. Definitions
"You" means the individual who Submits a Contribution to Us.
"Contribution" means any work of authorship that is Submitted by You to Us in which You own or assert ownership of the Copyright. If You do not own the Copyright in the entire work of authorship, please follow the instructions in https://github.com/raiden-network/raiden/blob/master/CONTRIBUTING.md.
@palango
palango / CLAs
Last active December 8, 2017 09:30
# Raiden Network Contributor License Agreement
Please read the *Raiden Network Individual Contributor License Agreement* if
you are signing on behalf of yourself or the *Raiden Entity Contributor License
Agreement* when you are signing on behalf of your employer and state your
choice below.
## Raiden Network Individual Contributor License Agreement
Thank you for your interest in contributing to Raiden Network ("We" or "Us").
@palango
palango / py2
Created December 7, 2017 11:42
_solidity differences py2/py3
In [8]: compile_file('/Users/paul/Work/raiden/raiden/smart_contracts/Registry.sol')
[11] > /Users/paul/Work/raiden-ve/lib/python2.7/site-packages/ethereum/_solidity.py(98)solc_parse_output()
-> value['bin'] = decode_hex(value['bin_hex'])
(Pdb++) value
{'bin': '6060604052341561000f57600080fd5b610c598061001e6000396000f30060606040526004361061005e5763ffffffff60e060020a6000350416633268a05a8114610063578063b32c65c81461008b578063c25224621461010a578063c800b0021461019b578063de394e0d14610201578063f565eb361461020c575b600080fd5b610071600435602435610272565b604051911515825260208201526040908101905180910390f35b610093610406565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156100cf5780820151838201526020016100b7565b50505050905090810190601f1680156100fc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610199600480359060446024803590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437820191505050505050919080359060200190820180359060200

**They focus on minutes, not hours. **Most people default to hour and half-hour blocks on their calendar; highly successful people know that there are 1,440 minutes in every day and that there is nothing more valuable than time. Money can be lost and made again, but time spent can never be reclaimed. As legendary Olympic gymnast Shannon Miller told Kevin, “To this day, I keep a schedule that is almost minute by minute.” You must master your minutes to master your life.

**They focus on only one thing. **Ultra-productive people know what their “Most Important Task” is and work on it for one to two hours each morning, without interruptions. What task will have the biggest impact on reaching your goals? What accomplishment will get you promoted at work? That’s what you should dedicate your mornings to every day.

**They don’t use to-do lists. **Throw away your to-do list; instead schedule everything on your calendar. It turns out that only 41% of items on to-do lists ever get done. All those undone items lea

(Pdb++) e
<Log(address='bdeec64a315fcf20ba6ec609e3960df58b60db3a',
topics=[101310747533482684183367052398542450937031360496695075225560644342949186288103],
data=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf2\x04z\x82F&c"\x0c\xa3\xcf\xb661\x15\x1c9\x17\xaa\xce\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc7\x8b\x86\x99}\x94T\x02cQ\x9a\xbcN\x11R\x85\x10X\xf5>')>
(Pdb++) e.to_dict()
{'bloom':
'00000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000040000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
'address': 'bdeec64a315fcf20ba6ec609e3960df58b60db3a', 'data':
'0x000000000000000000000000f2047a8246266
@palango
palango / error.py
Last active February 15, 2018 10:23
running build
running build_py
running compile_contracts
'/raiden/raiden/smart_contracts/HumanStandardToken.sol.static-abi.json' written
'/raiden/raiden/smart_contracts/ChannelManagerContract.sol.static-abi.json' written
'/raiden/raiden/smart_contracts/EndpointRegistry.sol.static-abi.json' written
'/raiden/raiden/smart_contracts/NettingChannelContract.sol.static-abi.json' written
'/raiden/raiden/smart_contracts/Registry.sol.static-abi.json' written
Traceback (most recent call last):
File "setup.py", line 187, in <module>
---> Running in 45baea175fae
running compile_webui
Running ['/tmp/node-v8.2.1-linux-x64/bin/npm', 'install'] in '/raiden/raiden/ui/web'
npm WARN deprecated nodemailer@2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
> uws@9.14.0 install /raiden/raiden/ui/web/node_modules/uws
> node-gyp rebuild > build_log.txt 2>&1 || exit 0