This file contains hidden or 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
| SELECT c.id as id, | |
| concat('https://github.com/', concat(f.repo-name, concat('/blob/master', f.path))) as url, | |
| c.content as content, | |
| f.size as size | |
| FROM [bigquery-public-data:github_repos.contents] as c, | |
| (select * from [bigquery-public-data:github_repos.files] | |
| where right(path,3) = '.py' limit 5) as f | |
| INNER JOIN c on f.id=c.id and f.id |
This file contains hidden or 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
| a | |
| ability | |
| able | |
| about | |
| above | |
| accept | |
| according | |
| account | |
| across | |
| act |
This file contains hidden or 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 java.util.Scanner; | |
| public class ContainerCalculator { | |
| public static void main(String[] args) { | |
| double r, h, d, volume, area; | |
| Scanner s = new Scanner(System.in); | |
| System.out.println("Welcome to Taylor's Container Calculator!"); | |
| System.out.println("========================================="); |
This file contains hidden or 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 java.util.Scanner; | |
| public class ContainerCalculator { | |
| public static void main(String[] args) { | |
| double r, h, d, volume, area; | |
| Scanner s = new Scanner(System.in); | |
| System.out.println("Welcome to Taylor's Container Calculator!"); | |
| System.out.println("========================================="); |
This file contains hidden or 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 java.util.Scanner; | |
| import java.math.*; | |
| public class ContainerCalculator | |
| { | |
| public static void main(String[] args) | |
| { | |
| double r, h, d, volume; | |
| Scanner scnr; |
This file contains hidden or 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
| # sample histogram of the bottom 40% pixels from a black & white image bw_image | |
| histogram = np.sum(bw_img[np.int(bw_img.shape[0]*0.6):,:], axis=0) | |
| def lane_centers(h): | |
| # h is a histogram of lane pixels | |
| # find the left and right max, which we return | |
| # as lane centers | |
| midpoint = np.int(h.shape[0]/2) | |
| mark_left = np.argmax(h[0:midpoint]) |
This file contains hidden or 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 random | |
| def ask(prompt, low, high): | |
| # keep asking until we get a number inside [low, high] | |
| x = low-1 | |
| while x < low or x > high: | |
| x = input(prompt+" ("+str(low)+"-"+str(high)+"): ") | |
| return x | |
| def ask_yes_no(prompt): |
This file contains hidden or 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
| { | |
| "cells": [ | |
| { | |
| "cell_type": "code", | |
| "execution_count": 1, | |
| "metadata": { | |
| "collapsed": false | |
| }, | |
| "outputs": [], | |
| "source": [ |
This file contains hidden or 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
| function save_contact($first, $last, $email, $phone, $zip) { | |
| $UN = "<username of your constant contact account, not the developer account>"; | |
| $PW = "<password to the username in $UN>"; | |
| $Key = "<your developer API key, not the secret key>"; | |
| $entry = '<entry xmlns="http://www.w3.org/2005/Atom"> | |
| <title type="text"> </title> | |
| <updated>' . date('c') . '</updated> | |
| <author></author> | |
| <id>data:,none</id> |