Skip to content

Instantly share code, notes, and snippets.

View martindale's full-sized avatar
🚀
relentless maker.

Eric Martindale martindale

🚀
relentless maker.
View GitHub Profile
@martindale
martindale / AD.hs
Created September 18, 2022 02:52 — forked from ttesmer/AD.hs
Automatic Differentiation in 38 lines of Haskell using Operator Overloading and Dual Numbers. Inspired by conal.net/papers/beautiful-differentiation
{-# LANGUAGE TypeSynonymInstances #-}
data Dual d = D Float d
type Float' = Float
diff :: (Dual Float' -> Dual Float') -> Float -> Float'
diff f x = y'
where D y y' = f (D x 1)
class VectorSpace v where
zero :: v
@martindale
martindale / octal_x86.txt
Created February 21, 2022 04:27 — forked from seanjensengrey/octal_x86.txt
x86 is an octal machine
# source:http://reocities.com/SiliconValley/heights/7052/opcode.txt
From: mark@omnifest.uwm.edu (Mark Hopkins)
Newsgroups: alt.lang.asm
Subject: A Summary of the 80486 Opcodes and Instructions
(1) The 80x86 is an Octal Machine
This is a follow-up and revision of an article posted in alt.lang.asm on
7-5-92 concerning the 80x86 instruction encoding.
The only proper way to understand 80x86 coding is to realize that ALL 80x86
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2011 thomasv@gitorious
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#

Signet

This is a description of how to get started with Signet. This document assumes you are capable of using git, and that you are able to compile Bitcoin. (If you have not yet done so, you should begin by doing that now.)

Fetch and compile signet

$ git clone https://github.com/kallewoof/bitcoin.git signet
$ cd signet
$ git checkout signet-0.18
@martindale
martindale / ff.py
Created December 31, 2018 03:10 — forked from elaineo/ff.py
Follow Friday
# -*- coding: utf-8 -*-
from TwitterAPI import TwitterAPI
from collections import Counter
import json
import time
import logging
# Edit ff.py for your account. Go to https://apps.twitter.com/ to get your API keys.
# Don't forget to fill in your screen name (or someone else's).
(function () { function r (e, n, t) { function o (i, f) { if (!n[i]) { if (!e[i]) { var c = typeof require === 'function' && require; if (!f && c) return c(i, !0); if (u) return u(i, !0); var a = new Error("Cannot find module '" + i + "'"); throw a.code = 'MODULE_NOT_FOUND', a; } var p = n[i] = {exports: {}}; e[i][0].call(p.exports, function (r) { var n = e[i][1][r]; return o(n || r); }, p, p.exports, r, e, n, t); } return n[i].exports; } for (var u = typeof require === 'function' && require, i = 0; i < t.length; i++)o(t[i]); return o; } return r; })()({1: [function (require, module, exports) {
var asn1 = exports;
asn1.bignum = require('bn.js');
asn1.define = require('./asn1/api').define;
asn1.base = require('./asn1/base');
asn1.constants = require('./asn1/constants');
asn1.decoders = require('./asn1/decoders');
asn1.encoders = require('./asn1/encoders');
# This should be the public-facing name (ie: dns name)
HOME_SERVER_URL="https://matrix.org"
# The room ID is NOT the room alias. The ID can be found at the bottom of the room settings dialog in riot-web
ROOM_ID="!AbCDef823s:matrix.org"
# This is your user ID and access token. The access token must match the user.
USER_ID="@turt2live:matrix.org" # The home server should match this domain as well (ie: t2l.io as a HS should be :t2l.io in the user)
ACCESS_TOKEN="token_here"
2018-07-16 23:10:46,900 - synapse.access.http.8010 - 92 - INFO - POST-9889- 127.0.0.1 - 8010 - Received request: POST /_matrix/client/r0/rooms/!2d3d0c0008263d371700321f3600062b1900%3Aexample.com/invite?
2018-07-16 23:10:46,901 - synapse.http.client - 94 - INFO - POST-9889- Sending request GET https://example.com/_matrix/identity/api/v1/lookup?medium=email&address=someone%40someoneelse.com
2018-07-16 23:10:46,913 - synapse.http.client - 109 - INFO - POST-9889- Received response to GET https://example.com/_matrix/identity/api/v1/lookup?medium=email&address=someone%40someoneelse.com: 404
2018-07-16 23:10:46,914 - synapse.http.server - 101 - ERROR - POST-9889- Failed handle request via <function _async_render at 0x7f401a34c398>: <SynapseRequest at 0x7f3fe206ca70 method='POST' uri='/_matrix/client/r0/rooms/!2d3d0c0008263d371700321f3600062b1900%3Aexample.com/invite?' clientproto='HTTP/1.1' site=8010>: Traceback (most recent call last):
File "/home/synapse/workspace/local/lib/python2.7/site-packages/twisted/inter
@martindale
martindale / progress.log
Created May 19, 2018 17:10
Update Gold
[eric@isengard fabric] (machine) ⚡ git fetch
remote: Counting objects: 250, done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 250 (delta 55), reused 58 (delta 53), pack-reused 186
Receiving objects: 100% (250/250), 56.69 KiB | 0 bytes/s, done.
Resolving deltas: 100% (169/169), completed with 20 local objects.
From github.com:martindale/fabric
20f15b9..6ef4b35 machine -> origin/machine
* [new branch] chat-example -> origin/chat-example
8759d42..f7a18ee cli-updated -> origin/cli-updated

Steps

Software Setup

Get Source Code

go get github.com/cosmos/cosmos-sdk