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
#!/bin/bash | |
function main () { ( | |
includePatterns=( | |
"com.google.apis.grpc:*" # generated grpc and proto libraries | |
"com.google.api:*" # gax, api-common, etc. | |
"com.google.api-client:*" # api client between discovery doc clients and http-client | |
"com.google.apis:*" # discovery doc generated clients | |
"com.google.auth:*" # | |
"com.google.cloud:*" # "clients" gapics/veneers |
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
from google.cloud import bigquery | |
import json | |
GITHUB_USERNAME = 'crwilcox' | |
START_DATE = "2019-08-26" | |
END_DATE = "2020-02-16" | |
client = bigquery.client.Client() | |
query = f"""SELECT repository, type, event AS status, COUNT(*) AS count |
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
import numpy as np | |
from numpy.linalg import inv | |
x_observations = np.array([4000, 4260, 4550, 4860, 5110]) | |
v_observations = np.array([280, 282, 285, 286, 290]) | |
z = np.c_[x_observations, v_observations] | |
# Initial Conditions | |
a = 2 # Acceleration |
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
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
import numpy as np | |
import cPickle as pickle | |
import gym | |
# hyperparameters | |
H = 200 # number of hidden layer neurons | |
batch_size = 10 # every how many episodes to do a param update? | |
learning_rate = 1e-4 | |
gamma = 0.99 # discount factor for reward |
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
# TODO: add an option that makes use of lubridate's quarter(date) if no value is | |
# entered for the *since* argument. | |
#=============================================================================== | |
# WEEK_SINCE | |
#=============================================================================== | |
#' @title week_since | |
#' @description calculates what week number some input date is, counting from | |
#' some specified starting date (eg the Start of Financial Year) | |
#' @details You can specify any start date you want by using the |
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
sudo add-apt-repository ppa:webupd8team/sublime-text-3; | |
sudo apt-get update; | |
sudo apt-get install sublime-text-installer; | |
sudo ln -s /usr/lib/sublime-text-3/sublime_text /usr/local/bin/sublime; |