Skip to content

Instantly share code, notes, and snippets.

View tonymorony's full-sized avatar

Anton "TonyL" Lysakov tonymorony

View GitHub Profile
@tonymorony
tonymorony / gist:0c486fa3b83d72c4e6155ebdef684cad
Created July 18, 2024 14:32 — forked from iscle/gist:66e946553e74a883b4494d3b6df0ee82
Install python2.7 on Ubuntu 23.04 as "python"
wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz
tar xzf Python-2.7.18.tgz
cd Python-2.7.18
sudo ./configure --enable-optimizations
sudo make altinstall
sudo ln -s "/usr/local/bin/python2.7" "/usr/bin/python"

Keybase proof

I hereby claim:

  • I am tonymorony on github.
  • I am tlysakov (https://keybase.io/tlysakov) on keybase.
  • I have a public key ASCg7zLMR46aXh0KYH97qxgfoTAr4Ds1qSLcMM0uuII3Two

To claim this, I am signing this object:

coinlist=(
'AXO 200000000'
'BET 999999'
'BOTS 999999'
'BTCH 20998641'
'CCL 200000000'
'COQUICASH 72000000'
'CRYPTO 999999'
'DEX 999999'
'ETOMIC 100000000'
@tonymorony
tonymorony / bot_example.py
Created March 11, 2020 07:43
Example of script "daemon status updates sending to Telegram"
import platform
import os
import re
import slickrpc
import shutil
import time
import threading
import math
import requests
import requests
import json
header = {"Authorization": "Bearer putyourAPItokenthere", 'Content-type': 'Application/JSON'}
servers_list1 = requests.get("https://api.hetzner.cloud/v1/servers?page=1&per_page=50", headers=header).json()
servers_list2 = requests.get("https://api.hetzner.cloud/v1/servers?page=2&per_page=50", headers=header).json()
servers_ips = []
from slickrpc import Proxy
rpc = Proxy("http://%s:%s@127.0.0.1:%d"%("rpcuser", "rpcpassword", 7771))
current_height = rpc.getinfo()["longestchain"]
needed_txs = []
while (current_height > 0):
block_txs_list = rpc.getblock(str(current_height))["tx"]
for tx_id in block_txs_list:
@tonymorony
tonymorony / all_prices_test.py
Last active September 3, 2019 15:28
comparison of coingecko API prices with makerbot coinpaprika all prices
import requests
import json
api_coins = {"BTC":"bitcoin","BCH":"bitcoin-cash","DGB":"digibyte","DASH":"dash",
"QTUM":"qtum","DOGE":"dogecoin","KMD":"komodo",
"ETH":"ethereum", "BAT":"basic-attention-token",
"USDC":"usd-coin", "LTC":"litecoin", "VRSC":"verus-coin","OMG":"omisego",
"RVN":"ravencoin","RFOX":"redfox-labs","ZILLA":"chainzilla"}
def get_prices_in_usd(coins_dict):
coins = [
# {
# 'tag': 'RICK',
# 'min_swap': 1,
# 'activate_with':'native',
# 'electrum': [{"url":"electrum1.cipig.net:10017"},
# {"url":"electrum2.cipig.net:10017"},
# {"url":"electrum3.cipig.net:10017"}]
# },
{
from mm2_coins import coins
import requests
import random
import time
import json
import calendar
import threading
trading_nodes = [
# insalling deps
yum update
yum groupinstall 'Development Tools'
yum install git pkgconfig automake autoconf ncurses-devel python wget gtest-devel gcc gcc-c++ libtool patch lbzip2
# by default centos7 have gcc without C11 support, so lets compile fresher gcc
curl https://ftp.gnu.org/gnu/gcc/gcc-5.4.0/gcc-5.4.0.tar.bz2 -O
tar -xvf gcc-5.4.0.tar.bz2