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 scala.annotation.tailrec | |
import spray.json._ | |
import DefaultJsonProtocol._ | |
import java.io._ | |
import java.net._ | |
object IrcClientMain | |
{ |
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
helo there |
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
def format_price(price): | |
def add_decimal(price, d): | |
price = str(price / 10 ** d) | |
return price[:-1] + '.' + price[-1] | |
if price < 10 ** 8: | |
return '%s' % price | |
elif price < 10 ** 11: | |
return '%sm' % add_decimal(price, 5) |