Skip to content

Instantly share code, notes, and snippets.

View JannesKlaas's full-sized avatar

Jannes Klaas JannesKlaas

View GitHub Profile
num_actions = 3 # [move_left, stay, move_right]
hidden_size = 100 # Size of the hidden layers
grid_size = 10 # Size of the playing field
def baseline_model(grid_size,num_actions,hidden_size):
#seting up the model with keras
model = Sequential()
model.add(Dense(hidden_size, input_shape=(grid_size**2,), activation='relu'))
model.add(Dense(hidden_size, activation='relu'))
model.add(Dense(num_actions))
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

M&A

Basic Terminology

  • Merger: Combination of two companies in which only one survives (A + B = A)
  • Consolidation: Combination of two companies into one new one (A + B = C)
  • Tender offer: Offer made directly to shareholders (usually in hostile takeover)
  • Acquisition: Basically any deal
  • Statutory merger: Merger under state laws under which acquirer is incorporated
  • Subsidiary merger: Target is kept as a separate firm owned by acquirer
  • Fairness opinion: External valuation
  • Joint venture: Combine different firms resources into new firm for joint project
@JannesKlaas
JannesKlaas / Corp_Fin.ipynb
Created December 2, 2018 15:36
Corporate Finance Assignment Monte Carlo Simulation
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
class ExperienceReplay(object):
"""
During gameplay all the experiences < s, a, r, s’ > are stored in a replay memory.
In training, batches of randomly drawn experiences are used to generate the input and target for training.
"""
def __init__(self, max_memory=100, discount=.9):
"""
Setup
max_memory: the maximum number of experiences we want to store
memory: a list of experiences
def train(model,epochs):
# Train
#Reseting the win counter
win_cnt = 0
# We want to keep track of the progress of the AI over time, so we save its win count history
win_hist = []
#Epochs is the number of games we play
for e in range(epochs):
loss = 0.
#Resetting the game
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.