Skip to content

Instantly share code, notes, and snippets.

@feaselkl
feaselkl / pg-pong.py
Created July 19, 2021 20:34
Minor update to Andrej Karpathy's Deep Reinforcement Learning blog post (https://karpathy.github.io/2016/05/31/rl/) to support Python 3.
import numpy as np
import pickle
import gym
# hyperparameters
H = 200 # number of hidden layer neurons
batch_size = 10 # after how many episodes do we do a parameter update?
learning_rate = 3e-4
gamma = 0.99 # discount factor for reward
decay_rate = 0.99 # decay factor for RMSProp leaky sum of grad^2
@feaselkl
feaselkl / sqldb-demo.ipynb
Created March 19, 2021 22:39
Read from Azure SQL Database in Azure Machine Learning and subsequently writing back to Azure SQL Database
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@feaselkl
feaselkl / ColumnstoreReorg.sql
Created March 21, 2016 23:55
Run this to get a list of columnstore index partitions to determine which should be reorganized. This script also generates index reorg statements which could be run.
-------------------------------------------------------------------
-- Script Name: ColumnstoreReorg.sql
--
-- Desc: Run this to get a list of columnstore index partitions
-- to determine which should be reorganized. The script also
-- generates index reorg statements which could be run.
--
-- Notes: SQL Server 2016 is REQUIRED. SQL Server 2016 changed
-- what index reorganization does to columnstore indexes,
-- and this script takes advantage of those changes.