Skip to content

Instantly share code, notes, and snippets.

def tail_binary_file(input_file, tag, output_file):
try:
with open(input_file, 'rb') as f:
# Read the entire file into memory
data = f.read()
# Find the position of the tag
tag_position = data.find(tag)
if tag_position == -1:
import json
def search_json(data, target_tag):
"""
Recursively search for a tag in a JSON object and return a list of values associated with that tag.
:param data: The JSON object (dictionary or list) to search in.
:param target_tag: The tag to search for.
:return: A list of values associated with the target tag.
"""
Manage Policies, Manage Metadata Ingestion, Create Domains, Manage Domains, Manage Glossaries
Exploring DAO2DAO Collaboration Mechanisms
Implementable Tools to Extend DAO Interaction Patterns in D2D Research Phase 2
BlockScience
BlockScience
Follow
Mar 15 · 23 min read
1. setup jq
2. pull cash-out file
3. setup bee node
4. setup geth
5. edit yaml file
# setup jq first
sudo apt -f install jq
# pull cash-out file
wget cashout.sh https://gist.githubusercontent.com/ralph-pichler/3b5ccd7a5c5cd0500e6428752b37e975/raw/b40510f1172b96c21d6d20558ca1e70d26d625c4/cashout.sh
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ducnh1022
ducnh1022 / ser.py
Created July 17, 2019 04:53
service for scoring
from flask import Flask, url_for
from flask import request
from flask import json
from flask import Response
from flask import jsonify
from gevent.pywsgi import WSGIServer
import mysql.connector
from mysql.connector import Error
var loadingDiv = document.createElement("div");
loadingDiv.style="background:white ;border: 1px solid Black; position: fixed; top: 50%; left: 50%; padding: 20px; z-index: 100; display:flex; flex-direction: row; align-items: center;";
document.body.append(loadingDiv);
var loadingImg = document.createElement("img");
loadingImg.src="https://steamcommunity-a.akamaihd.net/…/…/login/throbber.gif";
var loadingText = document.createElement("div");
loadingText.textContent = "loading matches please wait...";
loadingText.style = "margin-right: 10px;";
@ducnh1022
ducnh1022 / gist:df09c4fe558dd9019392e7801e57b678
Created April 15, 2018 17:15
Blockchain paper pdf list
Proof of stake - Casper
https://tendermint.com/static/docs/tendermint.pdf
https://arxiv.org/pdf/1406.5694.pdf
https://github.com/ethereum/research/blob/master/papers/CasperTFG/CasperTFG.pdf
https://github.com/ethereum/research/blob/master/papers/casper-basics/casper_basics.pdf
https://github.com/ethereum/research/blob/master/papers/casper-economics/casper_economics_basic.pdf
https://github.com/ethereum/research/blob/master/papers/cbc-consensus/AbstractCBC.pdf
https://github.com/ethereum/research/blob/master/papers/censorship_rejection/censorship_rejection.pdf
https://github.com/ethereum/research/blob/master/papers/other_casper/discouragement.pdf
Verifying my Blockstack ID is secured with the address 1E4LMRyD9DFvMcUh3cBMStEnqxSxELdpgU https://explorer.blockstack.org/address/1E4LMRyD9DFvMcUh3cBMStEnqxSxELdpgU