Skip to content

Instantly share code, notes, and snippets.

View cryppadotta's full-sized avatar

Dotta cryppadotta

View GitHub Profile
Bitvargen
Kel
Chuck K
merlin
Tom
Retired Yield Farmer
poplovski
Nard
Blockomoco
JEEVES
pragma solidity ^0.8.6;
contract SimpleStorage {
struct A {
uint256 id;
}
struct B {
A[] ids;
bool active;
}
@cryppadotta
cryppadotta / safe-add-delegate.py
Created October 7, 2022 20:06 — forked from abarmat/safe-add-delegate.py
Add a delegate to a Gnosis Safe
import time
import requests
import click
from web3 import Web3
def create_message(delegate_address):
totp = int(time.time()) // 3600
return delegate_address + str(totp)
@cryppadotta
cryppadotta / pick_option_chain.py
Last active March 29, 2023 20:09
PickOptionChain: Given a prompt, call an LLM to generate options and present the user with a terminal UI to pick from the options. The result is the option the user picked
"""
# PickOptionChain: Given a prompt, call an LLM to generate options and present the user with a terminal UI to pick from the options. The result is the option the user picked.
## Example:
```python
theme_query = "Let's create a poem. The first thing we need to do is pick a message or a theme. List out 8 themes and then ask the human to pick one of them"
llm = OpenAI(temperature=.7)
chain = PickOptionChain(llm=llm)