<s> from django . core . management . base import NoArgsCommand <EOL> from django . conf import settings <EOL> import os <EOL> import sys <EOL> import re <EOL> import codecs <EOL> import commands <EOL> import urllib2 <EOL> import urllib <EOL> import json <EOL> import random <EOL> from time import sleep <EOL> import math <EOL> import datetime <EOL> from django_bitcoin import Wallet <EOL> from django_bitcoin . utils import bitcoind <EOL> from decimal import Decimal <EOL> import warnings <EOL> import twitter <EOL> class Command ( NoArgsCommand ) : <EOL> help = '<STR_LIT>' <EOL> def handle_noargs ( self , ** options ) : <EOL> final_wallets = [ ] <EOL> process_num = random . randint ( <NUM_LIT:0> , <NUM_LIT:1000> ) <EOL> with warnings . catch_warnings ( ) : <EOL> warnings . filterwarnings ( "<STR_LIT:ignore>" , category = RuntimeWarning ) <EOL> for i in range ( <NUM_LIT:0> , <NUM_LIT:3> ) : <EOL> w = Wallet . objects . create ( ) <EOL> addr = w . receiving_address ( ) <EOL> final_wallets . append ( w ) <EOL> for w in final_wallets : <EOL> if w . total_balance_sql ( ) > <NUM_LIT:0> : <EOL> print str ( process_num ) + "<STR_LIT>" , w . id <EOL> raise Exception ( "<STR_LIT>" ) <EOL> print str ( process_num ) + "<STR_LIT>" , w1 . static_receiving_address ( ) <EOL> w1 = final_wallets [ <NUM_LIT:0> ] <EOL> w2 = final_wallets [ <NUM_LIT:1> ] <EOL> w3 = final_wallets [ <NUM_LIT:2> ] <EOL> bitcoind . send ( w1 . static_receiving_address ( ) , Decimal ( "<STR_LIT>" ) ) <EOL> while w1 . total_balance_sql ( ) <= <NUM_LIT:0> : <EOL> sleep ( <NUM_LIT:1> ) <EOL> w1 = Wallet . objects . get ( id = w1 . id ) <EOL> print str ( process_num ) + "<STR_LIT>" + str ( w1 . last_balance ) <EOL> print str ( process_num ) + "<STR_LIT>" <EOL> w1 . send_to_wallet ( w2 , Decimal ( "<STR_LIT>" ) ) <EOL> w1 . send_to_wallet ( w3 , Decimal ( "<STR_LIT>" ) ) <EOL> w3 . send_to_address ( w1 , Decimal ( "<STR_LIT>" ) ) <EOL> print str ( process_num ) + "<STR_LIT>" + str ( w1 . last_balance ) <EOL> print str ( process_num ) + "<STR_LIT>" + str ( w2 . last_balance ) <EOL> print str ( process_num ) + "<STR_LIT>" + str ( w3 . last_balance ) <EOL> while w1 . total_balance_sql ( ) <= <NUM_LIT:0> : <EOL> sleep ( <NUM_LIT:1> ) <EOL> w1 = Wallet . objects . get ( id = w1 . id ) <EOL> print str ( process_num ) + "<STR_LIT>" <EOL> print str ( process_num ) + "<STR_LIT>" + str ( w1 . last_balance ) <EOL> print str ( process_num ) + "<STR_LIT>" + str ( w2 . last_balance ) <EOL> print str ( process_num ) + "<STR_LIT>" + str ( w3 . last_balance ) </s>
