$ git clone https://github.com/big-data-europe/docker-hive
$ cd docker-hive
$ docker-compose up -d
connect to hive-server docker container
$ docker-compose exec hive-server bash
connect (to hive CLI?) using beeline
# /opt/hive/bin/beeline -u jdbc:hive2://localhost:10000
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 request = require("request"), | |
cheerio = require("cheerio"), | |
url = "https://www.google.com/search?q=data+mining", | |
corpus = {}, | |
totalResults = 0, | |
resultsDownloaded = 0; | |
function callback () { | |
resultsDownloaded++; |
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
MONGODB_URI=mongodb://localhost/replace_with_your_own_local_db |
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 React from "react"; | |
import { BrowserRouter, Route, Switch, Redirect } from "react-router-dom"; | |
import { CookiesProvider } from "react-cookie"; | |
import Header from "./Header/Header"; | |
import Footer from "./Footer/Footer"; | |
import Home from "./Home/Home"; | |
import NotFound from "./NotFound/NotFound"; | |
import Login from "./Account/Login/Login"; | |
import WrappedSignup from "./Account/Signup/WrappedSignup"; | |
import Profile from "./Account/Profile/Profile"; |
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
# .circleci/config.yml | |
# A circleci config for deploying https://github.com/davified/ci-workshop-app to heroku | |
version: 2 | |
jobs: | |
train_and_test: | |
docker: | |
- image: circleci/python:3.6.1 | |
working_directory: ~/repo | |
steps: | |
- checkout |
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
# .circleci/config.yml | |
# a script for deploying https://github.com/davified/ci-workshop-app to GCP App Engine | |
version: 2 | |
jobs: | |
train_and_test: | |
docker: | |
- image: circleci/python:3.6.1 | |
working_directory: ~/repo | |
steps: | |
- checkout |
Steps for deploying a docker image to heroku
docker build ...
heroku create david-docker-staging
docker login --username=_ --password=$(heroku auth:token) registry.heroku.com
docker push
heroku container:release web -a app_name
heroku open
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
# .circleci/config.yml | |
# CircleCI config for deploying docker containers to kubernetes + manual caching on CircleCI | |
version: 2 | |
jobs: | |
build_and_test: | |
working_directory: ~/repo | |
docker: | |
- image: google/cloud-sdk | |
steps: | |
- checkout |
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
def unexpectedly_mutate_original_data(cats): | |
_cats = cats.copy() # list.copy() method is a shallow copy. see https://docs.python.org/3/tutorial/datastructures.html | |
for cat in cats: | |
cat['new'] = 'something new' | |
return cats | |
original = [{'name': 'brownie'}, {'name': 'fluffy'}] | |
result = unexpectedly_mutate_original_data(original) | |
print(original) # see that original value is mutated |
OlderNewer