Skip to content

Instantly share code, notes, and snippets.

View kanewallmann's full-sized avatar

Kane Wallmann kanewallmann

View GitHub Profile
# coding=utf-8
# Copyright 2022 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@kanewallmann
kanewallmann / pinball.sol
Created October 30, 2021 02:57
Pineball Contract
/**
*Submitted for verification at Etherscan.io on 2021-10-21
*/
pragma solidity 0.8.9;
library LibPinball {
struct State {
bytes ball;
@kanewallmann
kanewallmann / overflow-factorying-with-z3.py
Created October 28, 2021 08:37
Solving Pinball Overflow Factoring Problem with Z3
from functools import reduce
from z3 import *
# Setup some constants
UINT16_MAX = 65535
TARGET = 0x020c020c # This is the target value we are looking for
# Create the z3 solver
s = Solver()