sudo echo 'deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main' > /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \
sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-9.6 postgresql-client-9.6 postgresql-contrib-9.6
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 Foundation | |
import Alamofire | |
public enum Router:URLRequestConvertible { | |
public static let baseUrlString:String = "http://testapi.example.com" | |
case Upload(fieldName: String, fileName: String, mimeType: String, fileContents: NSData, boundaryConstant:String); | |
var method: Alamofire.Method { | |
switch self { | |
case Upload: |
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
var real_docwrite = document.write, | |
body = $('body'); | |
(function insertGists(a_tags) { | |
if (a_tags.length > 0) { | |
a_tag = a_tags.shift() | |
document.write = function(stylesheet) { | |
$('head').append(stylesheet); | |
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 tensorflow as tf | |
from tensorflow.examples.tutorials.mnist import input_data | |
#import data | |
mnist = input_data.read_data_sets("data/", one_hot=True) | |
sess = tf.InteractiveSession() | |
# Create the model | |
x = tf.placeholder(tf.float32, [None, 784]) |
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
# Define the function | |
loghistplot <- function(data) { | |
require(ggplot2); require(gridExtra) # load packages | |
names(data) <- c('x','y') # rename columns | |
# get min and max axis values | |
min_x <- min(data$x) | |
max_x <- max(data$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
package main | |
import ( | |
"io" | |
"os" | |
"fmt" | |
"log" | |
"bytes" | |
"image" | |
"image/png" |
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
!pip install pathlib | |
!pip install fastai | |
!apt-get -qq install -y libsm6 libxext6 && pip install -q -U opencv-python | |
import cv2 | |
from os import path | |
from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag | |
platform = '{}{}-{}'.format(get_abbr_impl(), get_impl_ver(), get_abi_tag()) | |
accelerator = 'cu80' if path.exists('/opt/bin/nvidia-smi') else 'cpu' |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.