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
| ## I used the following program to benchmark ECDSA multiply vs. ECDSA | |
| ## multiply-then-add. | |
| ## | |
| ## Originally from http://bitcoin.stackexchange.com/a/25039 | |
| ## | |
| ## Sample output (where I get my 2% figure from.) | |
| ## ======================================================================= | |
| ## 7.90899729849 | |
| ## 8.05856181495 | |
| ## pubkey 0x50863ad64a87ae8a2fe83c1af1a8403cb53f53e486d8511dad8a04887e5b2352L 0x2cd470243453a299fa9e77237716103abc11a1df38855ed6f2ee187e9c582ba6L |
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
| #!/bin/bash | |
| #nmcli dev wifi con "$SSID" password "$password" | |
| yum update -y | |
| yum install -y net-tools traceroute git mosh screen make automake gcc gcc-c++ kernel-devel |
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
| #!/usr/bin/python | |
| import hashlib, struct | |
| # Mine genesis block | |
| ver = 1 | |
| prev_block = "0000000000000000000000000000000000000000000000000000000000000000" | |
| mrkl_root = "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b" | |
| time_ = 1231006505 | |
| bits = 0x1d00ffff |
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
| #!/bin/sh | |
| ssh root@$1 "wget -O - https://gist.githubusercontent.com/nickodell/9a6f556861a953e5d6b2/raw/setup.sh | sh" |
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
| #!/bin/sh | |
| # Run using | |
| # wget -O - https://gist.githubusercontent.com/nickodell/9a6f556861a953e5d6b2/raw/setup.sh | sh | |
| apt-get update | |
| apt-get install -y mosh screen | |
| git clone https://github.com/nickodell/build_bitcoin.git |
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
| library IEEE; | |
| use IEEE.STD_LOGIC_1164.ALL; | |
| use IEEE.STD_LOGIC_UNSIGNED.ALL; | |
| entity Switches_LEDs is | |
| Port ( switches : in STD_LOGIC_VECTOR(0 downto 0); | |
| LEDs : out STD_LOGIC_VECTOR(7 downto 0); | |
| clock : in STD_LOGIC | |
| ); | |
| end Switches_LEDs; |
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
| library IEEE; | |
| use IEEE.STD_LOGIC_1164.ALL; | |
| entity Switches_LEDs is | |
| Port ( switches : in STD_LOGIC_VECTOR(7 downto 0); | |
| LEDs : out STD_LOGIC_VECTOR(7 downto 0)); | |
| end Switches_LEDs; | |
| architecture Behavioral of Switches_LEDs is | |
| signal A : STD_LOGIC_VECTOR(3 downto 0); |
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
| 8,9c8,9 | |
| < looking at device '/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1.3/2-1.3.4/2-1.3.4:1.0/ttyUSB1/tty/ttyUSB1': | |
| < KERNEL=="ttyUSB1" | |
| --- | |
| > looking at device '/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1.3/2-1.3.1/2-1.3.1.4/2-1.3.1.4:1.0/ttyUSB2/tty/ttyUSB2': | |
| > KERNEL=="ttyUSB2" | |
| 13,14c13,14 | |
| < looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1.3/2-1.3.4/2-1.3.4:1.0/ttyUSB1': | |
| < KERNELS=="ttyUSB1" | |
| --- |
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 random | |
| def simulation(x): | |
| subjects = 0 | |
| trials = 0 | |
| while True: | |
| trials += 1 | |
| if random.random() < 0.30: | |
| #Runs following code with 30% chance | |
| subjects += 1 |
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 urllib2 | |
| import json | |
| url = "http://blockchain.info/charts/n-transactions?format=json" | |
| page = urllib2.urlopen(url).read() | |
| data = json.loads(page)['values'] | |
| data = map(lambda point: point['y'], data) | |
| print int(sum(data)) |