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
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct { | |
char name[11]; | |
int priority; | |
int runtime; | |
} Process; | |
float calculate_average_turnaround_time(Process processes[], int num_processes) { |
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 uniswap import Uniswap | |
from web3 import Web3 | |
address = "" # or None if you're not going to make transactions | |
private_key = "" # or None if you're not going to make transactions | |
version = 2 # specify which version of Uniswap to use | |
provider = "" # can also be set through the environment variable `PROVIDER` | |
uniswap = Uniswap(address=address, private_key=private_key, version=version, provider=provider) | |
# Some token addresses we'll be using later in this guide |
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
#! /bin/bash | |
while true | |
do | |
monitor=`ps -ef | grep gmgn.py | grep -v grep | wc -l` | |
if [ $monitor -eq 0 ] | |
then | |
echo "Program is not running, restart gmgn.py" | |
python gmgn.py | |
else |
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
# https://gmgn.ai/defi/quotation/v1/rank/eth/swaps/5m?orderby=swaps&direction=desc | |
# every 5s to request the url if check is ok, send message to discord or tg. | |
import datetime | |
import json | |
import time | |
import requests | |
import schedule |
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
{"timezone":"Asia/Shanghai","priceScaleSelectionStrategyName":"auto","paneProperties":{"backgroundType":"#solid","background":"#000000","backgroundGradientStartColor":"#181C27","backgroundGradientEndColor":"#131722","gridLinesMode":"both","vertGridProperties":{"color":"rgba(240, 243, 250, 0.06)","style":0},"horzGridProperties":{"color":"rgba(240, 243, 250, 0.06)","style":0},"crossHairProperties":{"color":"#9598A1","style":2,"transparency":0,"width":1},"topMargin":10,"bottomMargin":8,"axisProperties":{"autoScale":true,"autoScaleDisabled":false,"lockScale":false,"percentage":false,"percentageDisabled":false,"indexedTo100":false,"log":false,"logDisabled":false,"alignLabels":true,"isInverted":false},"legendProperties":{"showStudyArguments":true,"showStudyTitles":true,"showStudyValues":true,"showSeriesTitle":true,"showSeriesOHLC":true,"showLegend":true,"showBarChange":true,"showVolume":false,"showBackground":true,"showPriceSource":true,"backgroundTransparency":50,"showLogo":true},"separatorColor":"#2A2E39"},"scale |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.7; | |
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; | |
/** | |
* THIS IS AN EXAMPLE CONTRACT THAT USES HARDCODED | |
* VALUES FOR CLARITY. | |
* THIS IS AN EXAMPLE CONTRACT THAT USES UN-AUDITED CODE. | |
* DO NOT USE THIS CODE IN PRODUCTION. |
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 dotenv import load_dotenv | |
from xiaoaitts import XiaoAi | |
import threading | |
import requests | |
import time | |
import os | |
class fm(object): |
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
// 将键绑定放在此文件中以覆盖默认值auto[] | |
[ | |
{ | |
"key": "shift+alt+z", | |
"command": "editor.action.copyLinesUpAction", | |
"when": "editorTextFocus && !editorReadonly" | |
}, | |
{ | |
"key": "shift+alt+up", | |
"command": "-editor.action.copyLinesUpAction", |
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
{ | |
// | |
// | |
// edit | |
// | |
// | |
"editor.accessibilityPageSize": 10, | |
"editor.autoClosingBrackets": "languageDefined", | |
"editor.autoClosingOvertype": "auto", |
NewerOlder