Instantly share code, notes, and snippets.

# bonus85

• Stavanger, Norway
Created September 11, 2019 08:09
Keybase Claim
View keybase.md

### Keybase proof

I hereby claim:

• I am bonus85 on github.
• I am sindret (https://keybase.io/sindret) on keybase.
• I have a public key ASBb0hPvENR06vzQnTFcEBKeLtN38lh0FpmCH41hQvD9ywo

To claim this, I am signing this object:

Last active October 14, 2016 08:16
Project euler problem one solution
View problem_1.py
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
 #!/usr/bin/env python def sum_of_multiples_of_3_or_5(N): s = 0 for i in range(N): if i % 3 == 0 or i % 5 == 0: # Check if the number can be devided by 3 or 5 s += i # Add the number to the total sum print "The sum of all numbers that are multiples of 3 and 5 below %d is:" %N print s if __name__ == '__main__':
Created October 14, 2016 07:49
Webserver from scratch
View webserver.py
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
 """ Inspired by: https://ruslanspivak.com/lsbaws-part1/ """ import socket import time HOST = ''
Created June 23, 2016 12:43
View cartpole_hillclimb.py
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
 #!/usr/bin/env python import gym import random import numpy as np class Evaluator: def __init__(self, env_name='CartPole-v0', max_iterations=200, render=False): self.env = gym.make(env_name) self.render = render