Skip to content

Instantly share code, notes, and snippets.

View EdenShapiro's full-sized avatar

Eden Shapiro EdenShapiro

  • TripActions
  • Mountain View
View GitHub Profile
def logon(self):
p = proto.LogonRequest()
p.program = "WTCG"
p.platform = "Win"
p.locale = "enUS"
# p.email = None
p.version = "12051"
p.application_version = 1
p.public_computer = False
# p.sso_id = None
/*
* DO NOT EDIT.
*
* Generated by the protocol buffer compiler.
* Source: connection_service.proto
*
*/
import Foundation
import SwiftProtobuf
func sumAll(objs: Any...) -> Int {
var sum = 0
for object in objs {
if let num = object as? Int {
sum += num
} else if let str = object as? String {
if let num = Int(str){
sum += num
}
# Integer -> String
# 1 to 999999999
#create global dictionaries of specific "number" words
onesDic = {"1": "one ", "2": "two ", "3": "three ", "4": "four ", "5": "five ", "6": "six ", "7": "seven ", "8": "eight ", "9": "nine "}
teensDic = {"0": "ten ", "1": "eleven ", "2": "twelve ", "3": "thirteen ", "4":"fourteen ", "5":"fifteen ", "6":"sixteen ", "7":"seventeen ", "8":"eighteen ", "9": "nineteen "}
entysDic ={"2":"twenty ", "3": "thirty ", "4": "forty ", "5":"fifty ", "6":"sixty ", "7":"seventy ", "8":"eighty ", "9": "ninety "}
def int_to_string(num):
numString = str(num)