Skip to content

Instantly share code, notes, and snippets.

@josh-hernandez-exe
josh-hernandez-exe / secp256k1-make-public-keys.md
Last active August 31, 2023 13:24
`secp256k1` specified key generation in different languages

Making secp256k1 public keys with a given private key in different languages and different libraries

Using Bouncy Castle in C#

using System;
using System.Collections;
using System.Linq;
using System.Text;

using Org.BouncyCastle.Asn1.Sec;
@josh-hernandez-exe
josh-hernandez-exe / dropmix_mix_count.py
Last active April 10, 2018 06:04
Count the number of musically distinct mixes that can be generated in Dropmix without considering tempo or key.
import collections
import functools
import itertools
import operator
"""
Constants that will change over the life of the game
The current values are based off the following google sheet as of 2018/04/08 19:40 UTC
DropMix Card Checklist (Public)
https://docs.google.com/spreadsheets/d/13TjEBCW5Wv4xJgGVXGV7PfVNAuc3D07ADE-694NH1Ig/edit?usp=sharing
@josh-hernandez-exe
josh-hernandez-exe / CombinatoricEnumeration.cs
Last active April 20, 2018 17:22
Combinatoric Enumeration in C# Based of `itertools` model from python
using System.Linq;
using System.Collections.Generic;
namespace Combinatoric.Enumeration
{
public static class CombinatoricEnumeration
{
// https://docs.python.org/2/library/itertools.html#itertools.combinations
public static IEnumerable<List<T>> Combinations<T>(this IEnumerable<T> items, int r)
{
@josh-hernandez-exe
josh-hernandez-exe / jsonequals.py
Last active January 8, 2019 20:32
Test if two json dicts are equal.
def _get_json_iterator(json):
if isinstance(json, dict):
return json.keys()
elif isinstance(json, list):
return range(len(json))
else:
raise Exception()
def is_json_equal(json_a, json_b):
if json_a is json_b:
@josh-hernandez-exe
josh-hernandez-exe / phantom_force.ipynb
Last active September 17, 2020 05:34
Pokemon Masters Morty and Drifblim analysis on Phantom Force usage
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@josh-hernandez-exe
josh-hernandez-exe / genral_mpr.ipynb
Last active September 19, 2020 21:39
Move Point Refresh (MPR) Analysis for Pokemon Masters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@josh-hernandez-exe
josh-hernandez-exe / ex-3-3-2.ipynb
Last active September 19, 2020 22:28
625.603 Discussion Assignment 2
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@josh-hernandez-exe
josh-hernandez-exe / ex-3-9-17.ipynb
Last active October 5, 2020 18:14
625.603 Discussion Assignment 3
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@josh-hernandez-exe
josh-hernandez-exe / discussion-05.ipynb
Created December 2, 2020 20:33
625.603 Discussion Assignment 5 - Python/R/MATLAB/Julia
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.