Skip to content

Instantly share code, notes, and snippets.

@tflink
tflink / debug_resultsdb.py
Last active April 8, 2020 22:50
quick python script to show issue I'm having with querying results in resultsdb
import requests
nvr1 = "switchboard-plug-about.2.6.2-1.fc31"
nvr2 = "elementary-photos-2.7.0-1.fc33"
print("looking for results nvr={}".format(nvr1))
params = {'nvr':nvr1}
r = requests.get('http://taskotron.fedoraproject.org/resultsdb_api/api/v2.0/results', params=params)
print(r.json())
@tflink
tflink / gist:f33eea557702a284334bedcc9c762521
Created October 30, 2018 18:56
WAVES, X orderbook prices when X.decimals is not 8
Asset 2B4T has decimals 2
first ask price: 100000000
first bid price: 2000000
Asset AKCHE has decimals 4
first ask price: 9900000000
first bid price: 1000080000
Asset BAR has decimals 0
first ask price: 7900000000
first bid price: 220000000
Asset BCF has decimals 6
node = "https://nodes.wavesnodes.com"
matcher = "https://nodes.wavesnodes.com"
pywaves.setNode(node, "mainnet")
pywaves.setMatcher(matcher)
PRIVATE_KEY = ''
address = pywaves.Address(privateKey=PRIVATE_KEY)
assets = address.assets()
@tflink
tflink / testing-koji-fedmsg.py
Last active December 27, 2015 09:59 — forked from ralphbean/testing-koji-fedmsg.py
adding sys.stdout.flush() so that the script behaves better with redirection and tee
#!/usr/bin/env python
""" Collect data on fedmsg reliability.
The gist is that we start up and go into a loop. Each time we wake up we:
- Ask koji for all the builds that were started in the last hour. This
includes builds that eventually fail or are in progress.
- Ask fedmsg for all the koji events from the past error. Throw out all
the ones except the 'build start' events.
- Compare the number of new koji builds to the number of fedmsg new build
messages. They should be the same.