This file contains hidden or 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 | |
for id in $(cat $1); | |
do | |
echo "Allocate $id, Amount $2" | |
graph indexer rules set $id allocationAmount $2 parallelAllocations 1 decisionBasis always | |
done |
This file contains hidden or 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 sys | |
with open(sys.argv[1], 'r') as f: | |
n = 0 | |
for line in f: | |
if len(line) > n: | |
n = len(line) | |
with open(sys.argv[1], 'r') as f: | |
for line in f: | |
new = '{}{}'.format(line[0].lower(), line[1:]).strip().ljust(n) |
This file contains hidden or 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 | |
# Loga may contain different subgraphs - filter subgrafs manualy first of all | |
NAME_BASE=$(echo $1 | cut -d'.' -f 1) | |
SUMMARY_JSONL="${NAME_BASE}-summary.jsonl" | |
OUTPUT_JSONL="${NAME_BASE}.jsonl" | |
TREEBUF="${NAME_BASE}.treebuf" | |
AGORA=<PATH>agora1/agora/target/release/agora | |
echo "Converting log to jsonl $1" |
This file contains hidden or 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
# Script to convert ipfs to b58decode, eg QmTN6gMCBCYTgbis33eSvr6sLsQoQ3R6a2KzR7CqmMABQP -> '0xdfffeffgkjfijfoiqfioqmfqiomfdfffeffgkjfijfoiqfioqmfqiomf | |
# Require: file with list of ipfs: each row is one ipfs | |
# Usage: python3 convert-ipfs-to-bytes32.py file.csv | |
import binascii | |
import base58 | |
import sys | |
def ipfs_b32(ipfs): | |
output = base58.b58decode(ipfs) | |
output = output[2:] |
This file contains hidden or 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 | |
# Log may contain different subgraphs - filter subgrafs manualy first of all | |
# query.20201126_44.log | |
GRAPHS_LIST="<PATH>/all-graphs-list.csv" | |
TIMESTAMP=$(date --date="yesterday" +%Y%m%d) | |
#NAME_BASE=$(echo $1 | cut -d'.' -f 1,2) | |
NAME_BASE="query.${TIMESTAMP}" | |
LOGS="/fluentd/log/query-node/${NAME_BASE}*" | |
SUMMARY_JSONL="/fluentd/log/summary/${NAME_BASE}.summary.jsonl" |
This file contains hidden or 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
{ | |
"__inputs": [ | |
{ | |
"name": "DS_GRAPHQL_DATA SOURCE", | |
"label": "GraphQL Data Source", | |
"description": "", | |
"type": "datasource", | |
"pluginId": "fifemon-graphql-datasource", | |
"pluginName": "GraphQL Data Source" | |
}, |
NewerOlder