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
# -*- coding: utf-8 -*- | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import itertools | |
# Load data | |
prices = pd.read_csv("PizzaPrices.csv") | |
# Filter out an unwanted establishment | |
prices = prices[(prices['establishment_name'] != "Pizza Zone")] |
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
# Truly the most ridiculous thing I could think of. | |
doInstall <- TRUE # Change to FALSE if you don't want packages installed. | |
toInstall <- c("XML", "png", "devtools", "RCurl") | |
if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")} | |
lapply(toInstall, library, character.only = TRUE) | |
# Some helper functions, lineFinder and makeTable | |
source_gist("818983") | |
source_gist("818986") |
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 service nginx restart | |
sudo service ghost restart |
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
<?php | |
require 'vendor/autoload.php'; // If you're using Composer (recommended) | |
// Comment out the above line if not using Composer | |
// require("<PATH TO>/sendgrid-php.php"); | |
// If not using Composer, uncomment the above line and | |
// download sendgrid-php.zip from the latest release here, | |
// replacing <PATH TO> with the path to the sendgrid-php.php file, | |
// which is included in the download: | |
// https://github.com/sendgrid/sendgrid-php/releases |
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
https://www.pivotaltracker.com/help/api?version=v3#github_hooks | |
https://www.pivotaltracker.com/help/api?version=v3#scm_post_commit_message_syntax | |
SCM Post-Commit Message Syntax | |
To associate an SCM commit with a specific Tracker story, you must include a special syntax in the commit message to indicate one or more story IDs and (optionally) a state change for the story. Your commit message should have square brackets containing a hash mark followed by the story ID. If a story was not already started (it was in the "not started" state), a commit message will automatically start it. For example, if Scotty uses the following message when committing SCM revision 54321: | |
[#12345677 #12345678] Diverting power from warp drive to torpedoes. | |
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
--- | |
format_version: 1.1.0 | |
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git | |
trigger_map: | |
- push_branch: "*" | |
workflow: tests | |
workflows: | |
_tests_setup: | |
steps: | |
- activate-ssh-key: {} |
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
// This optional code is used to register a service worker. | |
// register() is not called by default. | |
// This lets the app load faster on subsequent visits in production, and gives | |
// it offline capabilities. However, it also means that developers (and users) | |
// will only see deployed updates on subsequent visits to a page, after all the | |
// existing tabs open on the page have been closed, since previously cached | |
// resources are updated in the background. | |
// To learn more about the benefits of this model and instructions on how to |
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
<?php | |
ignore_user_abort(true); | |
function syscall ($cmd, $cwd) { | |
$descriptorspec = array( | |
1 => array('pipe', 'w'), // stdout is a pipe that the child will write to | |
2 => array('pipe', 'w') // stderr |
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
// Simple gist to test parallel promise resolution when using async / await | |
function promiseWait(time) { | |
return new Promise((resolve, reject) => { | |
setTimeout(() => { | |
resolve(true); | |
}, time); | |
}); | |
} |
OlderNewer