This file contains 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
from util.hook import * | |
import random | |
import math | |
import time | |
from collections import Counter | |
bJ = 'blackjack' | |
doGamble = 0 | |
tipbotName = 'LDoge-Tipbot' |
This file contains 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
from util.hook import * | |
import random, math, time, re, os, json | |
from collections import Counter | |
from util import output | |
casino = [] | |
data_filename = 'data.json' | |
litedoge_total = 0 |
This file contains 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
from util.hook import * | |
import random, math, time, re, os, json | |
from collections import Counter | |
from util import output | |
casino = [] | |
data_filename = 'data.json' | |
litedoge_total = 0 |
This file contains 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 urllib | |
import logging | |
import json | |
def u_run_cmd(line, config): | |
logger = logging.getLogger('bot.cmd.u') | |
userNick = line.split(':')[2].split(' ') | |
get_coin = line.split(' ')[0] | |
logger.debug(userNick) | |
if len(userNick) == 2: |
This file contains 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
#!/usr/bin/env python2.7 | |
#Requires /util/parse.py & /util/__init__.py | |
""" | |
"pool <coin>"; | |
Ex: ".pool doge" | |
Sends pool information from API for coin to channel | |
""" | |
import urllib2, json | |
from parse import parse_json | |
from util.hook import * |
This file contains 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 re, json, codecs | |
def parse_json(filename): | |
with open(filename, 'r+') as f: | |
comment_re = re.compile('(^)?[^\S\n]*/(?:\*(.*?)\*/[^\S\n]*|/[^\n]*)($)?', re.DOTALL | re.MULTILINE) | |
content = f.read() | |
match = comment_re.search(content) | |
while match: | |
content = content[:match.start()] + content[match.end():] |
This file contains 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
//Used for MPOS API compatible pools. If you ain't got one, you're wasting your time | |
{"data": [ | |
{ | |
//http://url.com/index.php, etc. | |
"URL": "index.php?page=api&action=getuserstatus&api_key=", | |
"KEY": "<insert API key here>" | |
} | |
]} | |
//Did you know that these comments are the reason why I have parse.py? |
This file contains 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
#!/usr/bin/env python2.7 | |
#Requires /util/parse.py & /util/__init__.py | |
""" | |
"worth <optional: amount> <coin> <coin target>"; | |
Ex: ".worth 5 doge ltc" | |
Replies to user with value of an amount of one coin for another. Cryptonator API. | |
""" | |
import urllib2, json, re | |
from util import output | |
from parse import parse_json |
This file contains 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
#!/usr/bin/env python2.7 | |
""" | |
"join <#channel>", "part <#channel>"; | |
Ex: ".join #example", ".part #example" | |
Joins or parts from given channel. | |
""" | |
import urllib2, json, os | |
from parse import parse_json | |
from util.hook import * |
This file contains 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
##parse.py - https://gist.github.com/Aareon/95118516b7db4f88939c | |
import urllib2, json, re | |
from util.parse import parse_json | |
api_url = "http://corgex.corgicoin.co.uk/api_fetch.php?method=" | |
def api_info(): | |
response = urllib2.urlopen(api_url+"getinfo") | |
page = response.read() | |
getinfo = json.loads(page) |
OlderNewer