Tags » Mike Jones

Python arithmetic performace

I was working on Project Euler problem 12 (http://ift.tt/1jYXN5l) and came up with the following solution:

import math

def main():
    num = 0
    j = 0
    numFactors = 0
    while numFactors <= 500:
        j += 1


        num = num + j #num = sum of numbers from 1 to j
        #num = (j *(j+1))//2


        numFactors = 0
        for n in range(1,int(math.sqrt(num))):
            if num % n == 0:
                numFactors += 2

    print(num)

if __name__ == '__main__':
    from timeit import Timer
    t = Timer(lambda: main())
    print(t.timeit(number=1))
… 55 more words
Stackoverflow

St. Louis County Council Approves $1M in Emergency Funds for Ferguson Residents

ST. LOUIS COUNTY, Mo. (KMOX) - The St. Louis County Council has approved up to $1 million in emergency funds for people living in Ferguson who were unable to work or even leave their homes during the crisis. 186 more words

News

TEC sees early showdown

Northeastern football coach Mike Roeder knows well the type of athlete Winchester’s Kiante Enis is.

“One of the things that’s scary about him is you can stop him for 29 times and the last two he can score twice on you,” Roeder said. 749 more words

News

Of Failed Comebacks and Nearly Missed Returns...The After Action Report.

Austin Trout and Antonio DeMarco are two former world champions who have fallen on some tough times lately. Trout followed up a career best 2012 where he easily defeated current WBC Middleweight champion Miguel Cotto to a nightmarish 2013 where he lost both of his fights to Saul Alvarez and Erislandy Lara. 697 more words

Boxing

Quick Hits 8/25: Don George, Austin Trout, Herrera-Jones

Don George Captures Life-Long Dream

Chicago’s Don “Da Bomb” George captured the IBO Super Middleweight Title on Saturday in front of a home crowd at The White Sox, U.S. 429 more words

Featured Article

Knights, Falcons take wins in stride

A pair of Tri-Eastern Conference powers had huge opening week victories against reigning sectional champions.

Coaches from both those teams know that in the long run, however, Week 1 is irrelevant when sectional time rolls around. 726 more words

News

Falcons, Indians win openers

WINCHESTER, Ind. – Kiante Enis had 30 carries for 217 yards and four touchdowns as Winchester opened the season Friday night with a 35-25 victory over South Adams. 276 more words

News