Skip to content

Instantly share code, notes, and snippets.

import math
import requests
import threading
import concurrent.futures
thread_local = threading.local()
class FrameioUploader(object):
def __init__(self, asset, file):
self.asset = asset
import os
import time
import mimetypes
from frameioclient import FrameioClient
from pprint import pprint
def upload(file_p, parent_asset_id):
abs_path = os.path.abspath(file_p)
file_s = os.path.getsize(file_p)
def merge_slate_with_video(slate_path, video_path):
# Process w/ FFMPEG
with open("output.log", "a") as output:
# Generate intermediate transport streams to prevent re-encoding of h.264
print("Generating intermediate1.ts")
subprocess.call(
"""docker run -v $(pwd):$(pwd) -w $(pwd) jrottenberg/ffmpeg:3.2-scratch -y -i '{}' -c copy -bsf:v h264_mp4toannexb -f mpegts ./temp/intermediate1.ts""".format(slate_path),
shell=True, stdout=output, stderr=output
)
version: '3.3'
services:
elasticsearch:
container_name: smartscrape-elastisearch
build:
context: docker-elk/elasticsearch/
args:
ELK_VERSION: $ELK_VERSION
volumes:
- ./docker-elk/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
@jhodges10
jhodges10 / dash_payment_ranks.py
Created June 24, 2019 20:42
Return masternodes nodes ranked for payment
from rpc_methods import get_prgtx_info, get_best_block
from pprint import pprint
from collections import OrderedDict
"""
Sort the set in ascending order by "testHeight" and “ProRegTx hash”.
“testHeight” is determined for each individual entry and equals the “last paid height” (or “registered height” if the masternode was never paid).
If the masternode was PoSe-banned before and revived later, the “revival height” of the masternode is used instead of the “registered height”.
If the “testHeight” of two masternodes is identical, the ProRegTx hash acts as a deterministic tie breaker.
"""
#!/usr/bin/env python3
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
import time, os, sys
import logging
from pprint import pprint
rpc_password = "admin"
rpc_user = "admin"
#!/usr/bin/env python3
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
import time, os, sys
import logging
from pprint import pprint
rpc_password = "admin"
rpc_user = "admin"
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
import time, os, sys
import logging
from threading import Thread
print("Starting IX Spam Program")
password = "admin"
user = "admin"
#!/usr/bin/env python
import binascii
import zmq
import struct
import csv
import time
port = 5556
@jhodges10
jhodges10 / proper_dc_data.py
Last active September 13, 2018 00:40
Fetches the Dash Central budget API and monkey-patches the errors
import requests
import json
import os
import sys
import time
import datetime
import functools
def get_dc_data():