Skip to content

Instantly share code, notes, and snippets.

View Aareon's full-sized avatar
💭
Looking for work!

Aareon Sullivan Aareon

💭
Looking for work!
  • Amazon Ops Tech IT
  • Mississippi
  • 01:21 (UTC -06:00)
View GitHub Profile
@Aareon
Aareon / ldogecasino.py
Last active August 18, 2018 17:12
Edit: Indented too far in tip()
from util.hook import *
import random
import math
import time
from collections import Counter
bJ = 'blackjack'
doGamble = 0
tipbotName = 'LDoge-Tipbot'
@Aareon
Aareon / main.py
Last active December 28, 2015 03:30
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
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
@Aareon
Aareon / __init__.py
Last active January 1, 2016 21:24
u
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:
@Aareon
Aareon / pool.py
Last active January 4, 2016 18:29
Shitcoin: MPOS API IRC Bot - Aareon
#!/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 *
@Aareon
Aareon / parse.py
Last active January 2, 2016 21:52
/util/parse.py
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():]
@Aareon
Aareon / data.json
Last active January 4, 2016 00:44
data.json
//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?
@Aareon
Aareon / worth.py
Last active January 4, 2016 18:31
#!/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
#!/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 *
@Aareon
Aareon / info.py
Last active March 26, 2016 17:06
Needs parse.py, found in source.
##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)