Skip to content

Instantly share code, notes, and snippets.

View usptact's full-sized avatar

Vladislavs Dovgalecs usptact

View GitHub Profile
@usptact
usptact / wif.md
Created July 11, 2023 08:28 — forked from t4sk/wif.md
How to convert private key to WIF

How to convert private key to WIF

0. Overview

WIF = base58check encode ([version byte][private key][checksum])

version byte = 80 for mainnet, ef for testnet and regtest

checksum = first 4 bytes of double SHA256 of private key
@usptact
usptact / codesign_gdb.md
Created October 25, 2019 01:07 — forked from hlissner/codesign_gdb.md
Codesign gdb on OSX

Note: these instructions are for pre-Sierra MacOS. Sierra and newer users see https://gist.github.com/gravitylow/fb595186ce6068537a6e9da6d8b5b96d by @gravitylow.

If you are getting this in gdb on OSX while trying to run a program:

Unable to find Mach task port for process-id 57573: (os/kern) failure (0x5).
 (please check gdb is codesigned - see taskgated(8))
@usptact
usptact / letor_metrics.py
Created December 6, 2017 19:21 — forked from mblondel/letor_metrics.py
Learning to rank metrics.
# (C) Mathieu Blondel, November 2013
# License: BSD 3 clause
import numpy as np
def ranking_precision_score(y_true, y_score, k=10):
"""Precision at rank k
Parameters
@usptact
usptact / dataphilly-jul2016.ipynb
Created January 26, 2017 06:35 — forked from AustinRochford/dataphilly-jul2016.ipynb
DataPhilly July 2016 Introduction to Probabilistic Programming
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@usptact
usptact / ordinal_pymc3_DBDA23.2.2.py
Created January 25, 2017 02:23 — forked from DanielWeitzenfeld/ordinal_pymc3_DBDA23.2.2.py
functional implementation of ordinal predicted variable
import seaborn as sns
import pymc3 as pm
import numpy as np
from scipy.stats import norm
import pandas as pd
import theano.tensor as T
from theano.compile.ops import as_op
# Generate True data