# Machine Intelligence Made to Impersonate Characteristics: MIMIC | |
# NOTE run this $ conda install -c conda-forge mpi4py mpich to get mpi working | |
# accelerate launch --use_deepspeed -m axolotl.cli.train ./config_name_here | |
base_model: alpindale/Mistral-7B-v0.2-hf | |
base_model_config: alpindale/Mistral-7B-v0.2-hf | |
model_type: MistralForCausalLM | |
tokenizer_type: LlamaTokenizer | |
is_mistral_derived_model: true |
import inspect | |
import json | |
import re | |
import typing | |
from inspect import isclass, getdoc | |
from types import NoneType | |
from pydantic import BaseModel, Field | |
from pydantic.fields import FieldInfo | |
from typing import Any, Type, List, get_args, get_origin, Tuple, Union, Optional |
var web3 = require('web3'); | |
var rlp = require('rlp'); | |
var process = require( 'process' ); | |
var nonce = parseInt(process.argv[3]); | |
var account = process.argv[2]; | |
var d = web3.utils.sha3(rlp.encode([account, nonce])); | |
console.log("0x"+d.substring(d.length-40)); |
I was having trouble verifying my contracts on the Matic blockscout explorer when they were using included files such as the openzepplin libraries.
I found that I was not having good luck with the truffle-flattener, so I went out seeking something else.
I wound up using: https://github.com/DaveAppleton/SolidityFlattery -- which I found from this openzeppelin thread.
You'll need to install golang and configure your gopath.
Starting on L2:
- Any account on L2 may call
OVM_L2CrossDomainMessenger.sendMessage()
with the information for the L1 message (akaxDomainCalldata
)- (ie.
_target
,msg.sender
,_message
) - This data is hashed with the
messageNonce
storage variable, and the hash is store in thesentMessages
mapping (this is not actually used AFAIK) - The
messageNonce
is then incremented.
- (ie.
- The
OVM_L2CrossDomainMessenger
then passes thexDomainCalldata
toOVM_L2ToL1MessagePasser.passMessageToL1()
- the
xDomainCalldata
is hashed withmsg.sender
(ie.ovmCaller
), and written to thesentMessages
mapping.
// We require the Hardhat Runtime Environment explicitly here. This is optional | |
// but useful for running the script in a standalone fashion through `node <script>`. | |
// When running the script with `hardhat run <script>` you'll find the Hardhat | |
// Runtime Environment's members available in the global scope. | |
const hre = require("hardhat"); | |
async function main() { | |
// Hardhat always runs the compile task when running scripts through it. | |
// If this runs in a standalone fashion you may want to call compile manually | |
// to make sure everything is compiled |
import json | |
from eth_utils import encode_hex | |
from web3 import HTTPProvider, Web3 | |
from solc import compile_source | |
from web3.contract import ConciseContract | |
# Solidity source code | |
contract_source_code = ''' |
# please run: mkdir /tmp/img ; docker export $(docker create centos) | tar -C /tmp/img/ -xvf - | |
# before this script | |
import os | |
import ctypes | |
from multiprocessing import Process | |
CLONE_NEWUSER = 0x10000000 | |
CLONE_NEWPID = 0x20000000 |
To create a symlink to a Google Drive file or document there are a few methods.
You can right click the original file in the Google Drive UI and select Organize
and then Add Shortcut
There are also keyboard shortcuts. These shortcuts will change/have changed as of August 1st, 2024. Prior to August 2024 you could select the document you want to symlink, then hit Shift+Z and you'll be presented with a menu to choose the folder you'd like to add a symlink to
After August 2024, the keyboard shortcut is