手把手教学|如何超简单的部署io.net(以及解决网络问题)
本文主要从技术角度详细讲解了如何部署io.net,以及如何解决各种问题。 项目地址如下,是否部署投资等DYOR~io.net | Decentralized GPU Ecosystem for AI Workloads - Save Up to 70%Power your AI workloads with io.net's intelligent stack: on-demand GPU clusters in 130+ countries, up to 70% cost savings vs. AWS/GCP, and flexible deployment options. Built for AI teams - deploy containers, Ray clusters, or bare metal today.https://io.net1. 注册,添加worker从上面官网点进去之后,注册登录 点击官网左上角,会出现一长列,点击worker,中间会出现链接新的worker。 按照你的机器选择对应的配置,一直到底下出现命令行,也就是核心的第5步和第6步。...
Nexus节点运行| 疑难杂症解决方案
最近看到很多朋友在折腾 Nexus,尤其是在使用 CLI 的过程中会遇到一些 BUG。为此,我针对官方脚本做了一些优化,提供了一键安装的解决方案,让你更稳定地挖 Nexus。 官方教程链接:Nexus Network CLI - 官方文档 官方教程主要面向有一定技术基础的用户自行探索。如果你想要更快速、简单地上手,请继续阅读下面的步骤。 核心问题与解决方案什么是 Prover ID?如何获取正确的 ID? 进入 Nexus Beta 网站 后,你可能会看到一个 Prover ID,但请注意,页面左下角显示的并不是完整的 Prover ID!正确获取方式: https://beta.nexus.xyz/ 进入 Nexus Beta 页面后,按下 F12 打开浏览器开发者工具。 查找名为 account 的请求(或相关输出)。 在返回的 JSON 数据中,找到 localid 字段,这个 localid 就是你的真正 proverid。 你会发现其中前半部分和网页显示的相同,大小写忽略即可。2. 使用 CLI 挖 Nexus 前提条件 准备一个 VPS(最低配置即可,国外主机都可以)...
一键在Ubuntu上运行Bitcoin全节点(BTC系列教程1)
现在经常需要btc全节点。很多人得开着电脑24小时不关机,属实很麻烦。 但是如果购买一个小主机,配上Ubuntu系统,24小时运行全节点。开启RPC之后,电脑随时都能连上使用。当然也可以做Atom索引等本文将会讲解如何搭建一个基于ubuntu系统的bitcoin全节点。 需求操作系统os: ubuntu20.04内存: 2GSSD: 1TB对于家用小服务器,我推荐买个N100的mini主机大概几百块钱+一块2tssd,总成本可能在1k左右 功率在10w左右,可以24小时不关机。一个linux设备代表能拥有什么呢: 各种好玩的docker服务,各种脚本如何安装BTC全节点使用root用户登陆上ubuntu之后,运行下面命令即可。wget -O bitcoin_node.sh https://pub-e3b4652c5d5f4c1b8fbfdff04685c330.r2.dev/bitcoin_node.sh && chmod +x bitcoin_node.sh && sudo ./bitcoin_node.sh 当然这个脚本也可以在wind...
web3 build
手把手教学|如何超简单的部署io.net(以及解决网络问题)
本文主要从技术角度详细讲解了如何部署io.net,以及如何解决各种问题。 项目地址如下,是否部署投资等DYOR~io.net | Decentralized GPU Ecosystem for AI Workloads - Save Up to 70%Power your AI workloads with io.net's intelligent stack: on-demand GPU clusters in 130+ countries, up to 70% cost savings vs. AWS/GCP, and flexible deployment options. Built for AI teams - deploy containers, Ray clusters, or bare metal today.https://io.net1. 注册,添加worker从上面官网点进去之后,注册登录 点击官网左上角,会出现一长列,点击worker,中间会出现链接新的worker。 按照你的机器选择对应的配置,一直到底下出现命令行,也就是核心的第5步和第6步。...
Nexus节点运行| 疑难杂症解决方案
最近看到很多朋友在折腾 Nexus,尤其是在使用 CLI 的过程中会遇到一些 BUG。为此,我针对官方脚本做了一些优化,提供了一键安装的解决方案,让你更稳定地挖 Nexus。 官方教程链接:Nexus Network CLI - 官方文档 官方教程主要面向有一定技术基础的用户自行探索。如果你想要更快速、简单地上手,请继续阅读下面的步骤。 核心问题与解决方案什么是 Prover ID?如何获取正确的 ID? 进入 Nexus Beta 网站 后,你可能会看到一个 Prover ID,但请注意,页面左下角显示的并不是完整的 Prover ID!正确获取方式: https://beta.nexus.xyz/ 进入 Nexus Beta 页面后,按下 F12 打开浏览器开发者工具。 查找名为 account 的请求(或相关输出)。 在返回的 JSON 数据中,找到 localid 字段,这个 localid 就是你的真正 proverid。 你会发现其中前半部分和网页显示的相同,大小写忽略即可。2. 使用 CLI 挖 Nexus 前提条件 准备一个 VPS(最低配置即可,国外主机都可以)...
一键在Ubuntu上运行Bitcoin全节点(BTC系列教程1)
现在经常需要btc全节点。很多人得开着电脑24小时不关机,属实很麻烦。 但是如果购买一个小主机,配上Ubuntu系统,24小时运行全节点。开启RPC之后,电脑随时都能连上使用。当然也可以做Atom索引等本文将会讲解如何搭建一个基于ubuntu系统的bitcoin全节点。 需求操作系统os: ubuntu20.04内存: 2GSSD: 1TB对于家用小服务器,我推荐买个N100的mini主机大概几百块钱+一块2tssd,总成本可能在1k左右 功率在10w左右,可以24小时不关机。一个linux设备代表能拥有什么呢: 各种好玩的docker服务,各种脚本如何安装BTC全节点使用root用户登陆上ubuntu之后,运行下面命令即可。wget -O bitcoin_node.sh https://pub-e3b4652c5d5f4c1b8fbfdff04685c330.r2.dev/bitcoin_node.sh && chmod +x bitcoin_node.sh && sudo ./bitcoin_node.sh 当然这个脚本也可以在wind...
web3 build

Subscribe to Daniel

Subscribe to Daniel
Share Dialog
Share Dialog
>200 subscribers
>200 subscribers
本文所有代码全部都是chatgpt写的。 前两天留言问大家想要什么脚本,看到了有OKX开盘的,觉得这个不错
本文主要是教大家怎么描述需求让AI写代码~ 代码块上加粗部分都是我的对话语句,代码文件全部chatgpt写的。
research this python sdk https://github.com/coinrising/okex-api-v5 Assist me in writing Python code that calls the OKX API and utilizes its SDK.
from okex.account_api import AccountAPI
from okex.market_data_api import MarketDataAPI
from okex.trade_api import TradeAPI
from okex.const import *
# Set up authentication credentials
api_key = 'YOUR_API_KEY'
secret_key = 'YOUR_SECRET_KEY'
passphrase = 'YOUR_PASSPHRASE'
# Create API clients
account_client = AccountAPI(api_key, secret_key, passphrase, True)
trade_client = TradeAPI(api_key, secret_key, passphrase, True)
market_data_client = MarketDataAPI()
# Get the latest market price of BTC
response = market_data_client.get_ticker('BTC-USDT')
latest_price = response['last']
print(f"The latest price of BTC is {latest_price} USDT")
首先让他学习了okx的文档,这里已经识别出来怎么调用okex的Api来进行市场操作,但是我们的需求是抢开盘,那么告诉他。
I want to monitor a token for its listing and buy it as soon as it is listed.
import schedule
import time
from okex.trade_api import TradeAPI
from okex.account_api import AccountAPI
from okex.const import *
# Set up authentication credentials
api_key = 'YOUR_API_KEY'
secret_key = 'YOUR_SECRET_KEY'
passphrase = 'YOUR_PASSPHRASE'
# Set up trade parameters
symbol = 'TOKEN-USDT' # Replace with your desired token symbol
amount = 100 # Replace with your desired order amount in USDT
# Create API clients
account_client = AccountAPI(api_key, secret_key, passphrase, True)
trade_client = TradeAPI(api_key, secret_key, passphrase, True)
def buy_token():
try:
# Check if the token is listed
response = trade_client.get_specific_public_symbol(symbol)
if response['state'] == 'live':
# If the token is listed, place a market order to buy it
response = trade_client.place_market_order(symbol, SIDE_BUY, funds=amount)
print(response)
except Exception as e:
print(f"An error occurred: {e}")
# Schedule the buy_token function to be called every minute
schedule.every(1).minutes.do(buy_token)
# Run the scheduler loop
while True:
schedule.run_pending()
time.sleep(1)
这里看到已经在监控代币是否上线了,但是购买的时候间隔太长,并且一直循环购买,我想要在过了某一时间段之后疯狂请求购买,并且都变成参数可调。
Modify to scan the token online at millisecond level after reaching a certain time, and purchase it immediately once it is available.Do not use schedule.every().day, directly start the program when judging that the time is greater than something.
import time
import argparse
from datetime import datetime
from okex.trade_api import TradeAPI
from okex.account_api import AccountAPI
from okex.const import *
# Set up authentication credentials
api_key = 'YOUR_API_KEY'
secret_key = 'YOUR_SECRET_KEY'
passphrase = 'YOUR_PASSPHRASE'
# Set up trade parameters
symbol = 'TOKEN-USDT' # Replace with your desired token symbol
amount = 100 # Replace with your desired order amount in USDT
# Create API clients
account_client = AccountAPI(api_key, secret_key, passphrase, True)
trade_client = TradeAPI(api_key, secret_key, passphrase, True)
def buy_token():
try:
# Check if the token is listed
response = trade_client.get_specific_public_symbol(symbol)
if response['state'] == 'live':
# If the token is listed, place a market order to buy it
response = trade_client.place_market_order(symbol, SIDE_BUY, funds=amount)
print(response)
return True
except Exception as e:
print(f"An error occurred: {e}")
return False
if __name__ == '__main__':
# Parse command-line arguments
parser = argparse.ArgumentParser(description='Monitor token listing and buy immediately')
parser.add_argument('year', type=int, help='Listing year')
parser.add_argument('month', type=int, help='Listing month')
parser.add_argument('day', type=int, help='Listing day')
parser.add_argument('hour', type=int, help='Listing hour')
parser.add_argument('minute', type=int, help='Listing minute')
parser.add_argument('second', type=int, help='Listing second')
args = parser.parse_args()
# Convert command-line arguments to datetime object
listing_time = datetime(args.year, args.month, args.day, args.hour, args.minute, args.second)
# Monitor the token listing
while datetime.now() < listing_time:
time.sleep(1)
while not buy_token():
time.sleep(0.1)
这里已经基本上可用了,能监控交易对,能配置什么时候开始,(咱们只需要配置在开盘前3分钟就疯狂监控就可以了)但是我想让他更快一点呢?多线程疯狂请求。
Can we enable multi-threading during purchase to make it faster?
import time
import argparse
from datetime import datetime
from threading import Thread
from okex.trade_api import TradeAPI
from okex.account_api import AccountAPI
from okex.const import *
# Set up authentication credentials
api_key = 'YOUR_API_KEY'
secret_key = 'YOUR_SECRET_KEY'
passphrase = 'YOUR_PASSPHRASE'
# Set up trade parameters
symbol = 'TOKEN-USDT' # Replace with your desired token symbol
amount = 100 # Replace with your desired order amount in USDT
num_threads = 5 # Replace with the number of threads to use
# Create API clients
account_client = AccountAPI(api_key, secret_key, passphrase, True)
trade_client = TradeAPI(api_key, secret_key, passphrase, True)
def buy_token():
try:
# Check if the token is listed
response = trade_client.get_specific_public_symbol(symbol)
if response['state'] == 'live':
# If the token is listed, place a market order to buy it
response = trade_client.place_market_order(symbol, SIDE_BUY, funds=amount)
print(response)
return True
except Exception as e:
print(f"An error occurred: {e}")
return False
if __name__ == '__main__':
# Parse command-line arguments
parser = argparse.ArgumentParser(description='Monitor token listing and buy immediately')
parser.add_argument('year', type=int, help='Listing year')
parser.add_argument('month', type=int, help='Listing month')
parser.add_argument('day', type=int, help='Listing day')
parser.add_argument('hour', type=int, help='Listing hour')
parser.add_argument('minute', type=int, help='Listing minute')
parser.add_argument('second', type=int, help='Listing second')
args = parser.parse_args()
# Convert command-line arguments to datetime object
listing_time = datetime(args.year, args.month, args.day, args.hour, args.minute, args.second)
# Wait until the listing time
while datetime.now() < listing_time:
time.sleep(1)
# Buy the token using multiple threads
threads = []
for i in range(num_threads):
thread = Thread(target=buy_token)
thread.start()
threads.append(thread)
# Wait for all threads to complete
for thread in threads:
thread.join()
到这里基本上逻辑看起来完全可以用了,只需要稍微修改一下配置。 问题来了,是不是真的可用呢? 答案是否的,虽然逻辑都看起来对了,但是这个是调用okex的sdk,okex并没有官方sdk,而都是社区自己写的,这个时候就需要去找sdk的api是不是跟代码里面调用的一样的呢,不一样的话就需要修改成一样的,这个就需要稍微懂技术的人来修改了。
综上可得,Chatgpt确实可以写代码,并且写的逻辑完全没问题,在写模块化组件,CRUD,常规的工具类方面很强,但是触及到各种第三方调用,整体架构之类的还需要程序员自己修改。当然也可以直接给他模版,让他学习。
本文所有代码全部都是chatgpt写的。 前两天留言问大家想要什么脚本,看到了有OKX开盘的,觉得这个不错
本文主要是教大家怎么描述需求让AI写代码~ 代码块上加粗部分都是我的对话语句,代码文件全部chatgpt写的。
research this python sdk https://github.com/coinrising/okex-api-v5 Assist me in writing Python code that calls the OKX API and utilizes its SDK.
from okex.account_api import AccountAPI
from okex.market_data_api import MarketDataAPI
from okex.trade_api import TradeAPI
from okex.const import *
# Set up authentication credentials
api_key = 'YOUR_API_KEY'
secret_key = 'YOUR_SECRET_KEY'
passphrase = 'YOUR_PASSPHRASE'
# Create API clients
account_client = AccountAPI(api_key, secret_key, passphrase, True)
trade_client = TradeAPI(api_key, secret_key, passphrase, True)
market_data_client = MarketDataAPI()
# Get the latest market price of BTC
response = market_data_client.get_ticker('BTC-USDT')
latest_price = response['last']
print(f"The latest price of BTC is {latest_price} USDT")
首先让他学习了okx的文档,这里已经识别出来怎么调用okex的Api来进行市场操作,但是我们的需求是抢开盘,那么告诉他。
I want to monitor a token for its listing and buy it as soon as it is listed.
import schedule
import time
from okex.trade_api import TradeAPI
from okex.account_api import AccountAPI
from okex.const import *
# Set up authentication credentials
api_key = 'YOUR_API_KEY'
secret_key = 'YOUR_SECRET_KEY'
passphrase = 'YOUR_PASSPHRASE'
# Set up trade parameters
symbol = 'TOKEN-USDT' # Replace with your desired token symbol
amount = 100 # Replace with your desired order amount in USDT
# Create API clients
account_client = AccountAPI(api_key, secret_key, passphrase, True)
trade_client = TradeAPI(api_key, secret_key, passphrase, True)
def buy_token():
try:
# Check if the token is listed
response = trade_client.get_specific_public_symbol(symbol)
if response['state'] == 'live':
# If the token is listed, place a market order to buy it
response = trade_client.place_market_order(symbol, SIDE_BUY, funds=amount)
print(response)
except Exception as e:
print(f"An error occurred: {e}")
# Schedule the buy_token function to be called every minute
schedule.every(1).minutes.do(buy_token)
# Run the scheduler loop
while True:
schedule.run_pending()
time.sleep(1)
这里看到已经在监控代币是否上线了,但是购买的时候间隔太长,并且一直循环购买,我想要在过了某一时间段之后疯狂请求购买,并且都变成参数可调。
Modify to scan the token online at millisecond level after reaching a certain time, and purchase it immediately once it is available.Do not use schedule.every().day, directly start the program when judging that the time is greater than something.
import time
import argparse
from datetime import datetime
from okex.trade_api import TradeAPI
from okex.account_api import AccountAPI
from okex.const import *
# Set up authentication credentials
api_key = 'YOUR_API_KEY'
secret_key = 'YOUR_SECRET_KEY'
passphrase = 'YOUR_PASSPHRASE'
# Set up trade parameters
symbol = 'TOKEN-USDT' # Replace with your desired token symbol
amount = 100 # Replace with your desired order amount in USDT
# Create API clients
account_client = AccountAPI(api_key, secret_key, passphrase, True)
trade_client = TradeAPI(api_key, secret_key, passphrase, True)
def buy_token():
try:
# Check if the token is listed
response = trade_client.get_specific_public_symbol(symbol)
if response['state'] == 'live':
# If the token is listed, place a market order to buy it
response = trade_client.place_market_order(symbol, SIDE_BUY, funds=amount)
print(response)
return True
except Exception as e:
print(f"An error occurred: {e}")
return False
if __name__ == '__main__':
# Parse command-line arguments
parser = argparse.ArgumentParser(description='Monitor token listing and buy immediately')
parser.add_argument('year', type=int, help='Listing year')
parser.add_argument('month', type=int, help='Listing month')
parser.add_argument('day', type=int, help='Listing day')
parser.add_argument('hour', type=int, help='Listing hour')
parser.add_argument('minute', type=int, help='Listing minute')
parser.add_argument('second', type=int, help='Listing second')
args = parser.parse_args()
# Convert command-line arguments to datetime object
listing_time = datetime(args.year, args.month, args.day, args.hour, args.minute, args.second)
# Monitor the token listing
while datetime.now() < listing_time:
time.sleep(1)
while not buy_token():
time.sleep(0.1)
这里已经基本上可用了,能监控交易对,能配置什么时候开始,(咱们只需要配置在开盘前3分钟就疯狂监控就可以了)但是我想让他更快一点呢?多线程疯狂请求。
Can we enable multi-threading during purchase to make it faster?
import time
import argparse
from datetime import datetime
from threading import Thread
from okex.trade_api import TradeAPI
from okex.account_api import AccountAPI
from okex.const import *
# Set up authentication credentials
api_key = 'YOUR_API_KEY'
secret_key = 'YOUR_SECRET_KEY'
passphrase = 'YOUR_PASSPHRASE'
# Set up trade parameters
symbol = 'TOKEN-USDT' # Replace with your desired token symbol
amount = 100 # Replace with your desired order amount in USDT
num_threads = 5 # Replace with the number of threads to use
# Create API clients
account_client = AccountAPI(api_key, secret_key, passphrase, True)
trade_client = TradeAPI(api_key, secret_key, passphrase, True)
def buy_token():
try:
# Check if the token is listed
response = trade_client.get_specific_public_symbol(symbol)
if response['state'] == 'live':
# If the token is listed, place a market order to buy it
response = trade_client.place_market_order(symbol, SIDE_BUY, funds=amount)
print(response)
return True
except Exception as e:
print(f"An error occurred: {e}")
return False
if __name__ == '__main__':
# Parse command-line arguments
parser = argparse.ArgumentParser(description='Monitor token listing and buy immediately')
parser.add_argument('year', type=int, help='Listing year')
parser.add_argument('month', type=int, help='Listing month')
parser.add_argument('day', type=int, help='Listing day')
parser.add_argument('hour', type=int, help='Listing hour')
parser.add_argument('minute', type=int, help='Listing minute')
parser.add_argument('second', type=int, help='Listing second')
args = parser.parse_args()
# Convert command-line arguments to datetime object
listing_time = datetime(args.year, args.month, args.day, args.hour, args.minute, args.second)
# Wait until the listing time
while datetime.now() < listing_time:
time.sleep(1)
# Buy the token using multiple threads
threads = []
for i in range(num_threads):
thread = Thread(target=buy_token)
thread.start()
threads.append(thread)
# Wait for all threads to complete
for thread in threads:
thread.join()
到这里基本上逻辑看起来完全可以用了,只需要稍微修改一下配置。 问题来了,是不是真的可用呢? 答案是否的,虽然逻辑都看起来对了,但是这个是调用okex的sdk,okex并没有官方sdk,而都是社区自己写的,这个时候就需要去找sdk的api是不是跟代码里面调用的一样的呢,不一样的话就需要修改成一样的,这个就需要稍微懂技术的人来修改了。
综上可得,Chatgpt确实可以写代码,并且写的逻辑完全没问题,在写模块化组件,CRUD,常规的工具类方面很强,但是触及到各种第三方调用,整体架构之类的还需要程序员自己修改。当然也可以直接给他模版,让他学习。
No activity yet