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
Introduction to SQL for BigQuery and Cloud SQL | |
# Exploring the BigQuery Console | |
SELECT end_station_name FROM `bigquery-public-data.london_bicycles.cycle_hire`; | |
SELECT * FROM `bigquery-public-data.london_bicycles.cycle_hire` WHERE duration>=1200; | |
SELECT start_station_name FROM `bigquery-public-data.london_bicycles.cycle_hire` GROUP BY start_station_name; | |
# More SQL Keywords: GROUP BY, COUNT, AS, and ORDER BY | |
SELECT start_station_name, COUNT(*) FROM `bigquery-public-data.london_bicycles.cycle_hire` GROUP BY start_station_name; | |
SELECT start_station_name, COUNT(*) AS num_starts FROM `bigquery-public-data.london_bicycles.cycle_hire` GROUP BY start_station_name; |
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
source 'https://rubygems.org' | |
gem "octokit", "~> 4.0" |
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
{ | |
"Ansi 7 Color" : { | |
"Green Component" : 0.73333334922790527, | |
"Red Component" : 0.73333334922790527, | |
"Blue Component" : 0.73333334922790527 | |
}, | |
"Tags" : [ | |
], | |
"Ansi 12 Color" : { |
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
require 'rails_helper' | |
describe CarModelAPIService do | |
shared_examples_for 'fetch method' do | |
it { is_expected.to eq(result) } | |
end | |
describe '#fetch' do | |
subject { CarModelAPIService.new(params).fetch } | |
context 'when params is xxx' do |
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
--create database testing_json_performance; | |
--create table test_table (income float, start_period integer, end_period integer, name varchar(50), invitation_only boolean, properties jsonb); | |
--select * from test_table; | |
--delete from test_table; | |
-- -- create index | |
--create index idx_income on test_table (income); | |
--create index idx_period on test_table (start_period, end_period); | |
--create index idx_name on test_table (name); | |
--create index idx_properties_income on test_table using gin ((properties -> 'income') jsonb_path_ops); |
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
# check whether critical has been generated | |
if ! [ -x "$(command -v critical)" ]; then | |
echo 'Error: critical CSS is not installed.' >&2 | |
exit 1 | |
fi | |
# ask for website | |
echo "Website URL (without http / https):" | |
read -r url |
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
require 'csv' | |
require 'json' | |
reading_filename = 'input.csv' | |
output_filename = 'output.json' | |
arr = CSV.read(reading_filename) | |
File.open(output_filename, 'w') do |f| | |
f.write(arr.to_json) |
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
require 'byebug' | |
require 'json' | |
require 'logger' | |
require 'octokit' | |
username = 'x' | |
github_token = 'x' | |
organization_name = 'x' |
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
New Feature - #ccffcc | |
Bugfix - #ffe6e6 | |
Chore - #cceeff | |
Epic - #3399ff | |
Work In Progress - #ff9900 | |
Do Not Merge - #d73a4a |
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
# Ruby CircleCI 2.0 configuration file | |
# | |
# Check https://circleci.com/docs/2.0/language-ruby/ for more details | |
# | |
# TODO: Remove the following when CircleCI Image is using newer version | |
# Refer to issue here: https://discuss.circleci.com/t/session-not-created-exception-chrome-version-must-be-62-0-3202-0/19258 | |
install_chrome: &install_chrome | |
name: Install Chrome | |
command: | | |
sudo apt-get update |