Tested on ubuntu 20.04.3
sudo apt-get install build-essential
sudo apt install libcairo2-dev
sudo apt install libgsl-dev
sudo apt install libgtk-3-dev
[package] | |
name = "playground" | |
version = "0.1.0" | |
edition = "2021" | |
[dependencies] | |
alloy = { git = "https://github.com/alloy-rs/alloy.git", features = ["contract", "provider-ws", "rpc-types-eth"] } | |
anyhow = "1.0.82" | |
tokio = { version = "1.37.0", features = ["full"] } | |
tracing = "0.1.40" |
from eth_abi import decode, encode | |
from eth_utils import function_signature_to_4byte_selector | |
from pyrevm import EVM | |
# https://etherscan.io/tx/0x652bae3b1c11fbcf64309c2dfec5537b9bd1d3f2b521176f71ba1115a313ecbd" | |
# Swap 0.031485012992133186 ETH for 1,110.686711078457978839 CSWAP on Uniswap v2 | |
block_number = 19726294 | |
caller = "0xc0170e050355408e53800d093f3f13c3a53b29c8" | |
router = "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D" | |
token = "0xae41b275aaAF484b541A5881a2dDED9515184CCA" |
import json | |
MIN_ERC20_ABI = json.loads( | |
""" | |
[{"constant": true, "inputs": [], "name": "name", "outputs": [ { "name": "", "type": "string" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "_spender", "type": "address" }, { "name": "_value", "type": "uint256" } ], "name": "approve", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "totalSupply", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "_from", "type": "address" }, { "name": "_to", "type": "address" }, { "name": "_value", "type": "uint256" } ], "name": "transferFrom", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "decimals", "outputs": [ { "name" |
-- # PopClip Run in Warp | |
-- { name: Run in Warp, icon: iconify:simple-icons:warp, language: applescript } | |
tell application "Warp" | |
activate | |
tell application "System Events" | |
tell process "Warp" | |
delay 0.01 | |
set sourceText to "{popclip text}" | |
keystroke sourceText | |
delay 0.01 |
#!/bin/bash | |
# | |
# convert a mysql database to sqlite3 | |
# | |
#see https://stackoverflow.com/questions/5164033/ | |
# export-a-mysql-database-to-sqlite-database | |
mysql_host=localhost | |
mysql_user=george | |
#mysql_passwd=**************** |
""" | |
preprocess-twitter.py | |
python preprocess-twitter.py "Some random text with #hashtags, @mentions and http://t.co/kdjfkdjf (links). :)" | |
Script for preprocessing tweets by Romain Paulus | |
with small modifications by Jeffrey Pennington | |
with translation to Python by Motoki Wu | |
Translation of Ruby script to create features for GloVe vectors for Twitter data. |
# Include the Dropbox SDK | |
import dropbox | |
# Get your app key and secret from the Dropbox developer website | |
# https://www.dropbox.com/developers-v1/apps | |
app_key = 'key' | |
app_secret = 'secret' | |
flow = dropbox.client.DropboxOAuth2FlowNoRedirect(app_key, app_secret) |