- Clone the source code from https://github.com/MetaMask/metamask-extension
- Switch to
snaps
branch yarn setup
- Copy the
.metamaskrc.dist
file to.metamaskrc
and replace theINFURA_PROJECT_ID
value with your own. yarn run build prod --build-type flask
- The build should be located at directory
dist
.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from io import BytesIO | |
import torch | |
from fastapi.responses import StreamingResponse | |
from leptonai.photon import Photon | |
from loguru import logger | |
class JPEGResponse(StreamingResponse): | |
media_type = "image/jpeg" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function* streamAsyncIterable<T = unknown>(stream: ReadableStream<T>) { | |
const reader = stream.getReader() | |
try { | |
while (true) { | |
const { done, value } = await reader.read() | |
if (done) { | |
return | |
} | |
yield value | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Chain, Common } from "@nomicfoundation/ethereumjs-common"; | |
import { TransactionFactory } from "@nomicfoundation/ethereumjs-tx"; | |
import { VM } from "@nomicfoundation/ethereumjs-vm"; | |
import { ForkBlockchain } from "hardhat/internal/hardhat-network/provider/fork/ForkBlockchain"; | |
import { ForkStateManager } from "hardhat/internal/hardhat-network/provider/fork/ForkStateManager"; | |
import { makeForkClient } from "hardhat/internal/hardhat-network/provider/utils/makeForkClient"; | |
const JSON_RPC_URL = "https://rpc.ankr.com/eth"; | |
async function simulateTx(signedTx: string) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import HDWalletProvider from "@truffle/hdwallet-provider"; | |
import { OpenSeaPort, Network } from "opensea-js"; | |
import { PRIVATE_KEY } from "./consts.mjs"; | |
const provider = new HDWalletProvider({ | |
privateKeys: [PRIVATE_KEY], | |
providerOrUrl: "https://rpc.ankr.com/eth", | |
}); | |
provider.engine.on("error", (err) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"contracts": { | |
"@openzeppelin/contracts/access/Ownable.sol": { | |
"Ownable": { | |
"storageLayout": { | |
"storage": [ | |
{ | |
"astId": 7, | |
"contract": "@openzeppelin/contracts/access/Ownable.sol:Ownable", | |
"label": "_owner", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addEventListener("fetch", event => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
function jsonResponse(o) { | |
return new Response(JSON.stringify(o), { | |
headers: { | |
"content-type": "application/json;charset=UTF-8", | |
'Access-Control-Allow-Origin': '*', | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[0:0.000,0:25.520] 突击检查环节,你在小宇宙是什么,担当小宇宙声音最好听的是谁小宇宙最近一次团建干了什么吃饭吧,好久没有看见了下周团建一直吃饭吃了什么,本帮菜应该是又是本帮菜。 | |
[0:25.520,0:50.240] 不是就就上次吃了一次霸王餐,那你们确实很久没有团建了,赶紧去听我上次播客我又给你们推荐团建餐厅,你们有去唱歌吗,你刚刚应该说你们有去唱歌麦霸是谁鸡丝勉强可以算吧,基斯喜欢唱什么歌。 | |
[0:50.760,0:52.960] 呃,祭司可能。 | |
[0:52.980,1:21.020] 能唱的歌这歌录非常广,但是他上一次去KTV的时候,他唱的是说唱没有唱500吗,他挣500很厉害,是500可能就属于他的优势项目,他可能觉得唱的太多了,没意思,他上次也唱了,但是她呃,上次主要挑战的是杨和苏的那个一首歌啊,那他下次可以再这个录音系在多唱唱可以啊,他的声音非常适合唱500这种。 | |
[1:21.020,1:52.240] Feel的歌非非常非常的合适,那唱说唱说唱,嗯,你自己找机会去听吧,好吧,呵呵hello,我是羊,你刚才听到的是一段来自几个办公室的对话,我和我的同事小宇宙的产品经理大核桃在一个普通的工作日,晚上我们聊聊播客,当然也聊了聊小宇宙,这里其实就是说到就是很多人想做博客,但是不知道从什么开始。 | |
[1:52.580,2:6.420] 呃,怎么说呢,就是说大家传统上的一个定位就觉得好节目,可能是呃,日坛大内那样的OK,没错,我觉得这没错,但是你要想开始这一步的话,你就是可以从你最擅长呃。 | |
[2:6.660,2:28.780] 最有把握的事情开始,比如说你就是可能先聊一聊你身边的小事聊聊你现在的想法,那么你通过这样的一个过程,你就可以知道啊,你其实你其实更想讲的东西是什么,你其实更擅长的东西是什么,然后你就能找到说你真正的想做一个更好的节目的时候你要去做什么,这个其实就是我们当时做的零七的一个初衷。 | |
[2:28.780,2:46.140] 你不用说为第零七一开始就为第零七设定一个非常宏大的目标,说我要做一个日坛公园,我举例啊,我要做一个日坛公园,然后用非常高规格的方式来对待他,你要写逐字稿,你要呃拉人来聊,然后搞得自己压力很大。 | |
[2:46.240,3:4.700] 然后把它露出来,其实不是的,我们是希望说你反而可以用一种非常低成本的方式先去尝试那么呃,你可以在这里面你可以你可 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fillText(ctx, text, x, y, maxWidth, spacing = 0){ | |
const lines = text.split('\n') | |
let lineHeight = 0 | |
for (const line of lines) { | |
if (!line) { | |
y += lineHeight | |
continue | |
} | |
let s = '' | |
for (const char of line) { |
NewerOlder