In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:
- Separate big codebases into multiple repositories.
#!/usr/bin/env python | |
import string | |
import random | |
import sys | |
import pickle | |
f = open("employee_review_corpus.txt", "r") | |
contents = f.read() | |
f.close() |
#!/bin/bash | |
### USAGE | |
### | |
### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7 | |
### ./ElasticSearch.sh will fail because no version was specified (exit code 1) | |
### | |
### CLI options Contributed by @janpieper | |
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch |
#!/bin/bash | |
# Set these to the Docker hosts you want each container to run on | |
ZOOKEEPER_HOST=10.0.1.249 | |
NIMBUS_HOST=10.0.1.250 | |
SUPERVISOR_HOST=10.0.1.251 | |
# Run ZooKeeper | |
$ export DOCKER_HOST=tcp://$ZOOKEEPER_HOST:5000 | |
$ docker run -h zookeeper --name=zookeeper -d jplock/zookeeper |
# Install BigchainDB on a VM with Vagrant | |
It's quite easy to provision and run a Vagrant VM: | |
* Install Vagrant in your host system following instructions [here](https://www.vagrantup.com/docs/installation/) | |
* In your VM-to-be's home directory create the `VagrantFile` and the bash script to provision the machine (`config.sh`) | |
**VagrantFile** | |
``` | |
# -*- mode: ruby -*- |
'''This script goes along the blog post | |
"Building powerful image classification models using very little data" | |
from blog.keras.io. | |
It uses data that can be downloaded at: | |
https://www.kaggle.com/c/dogs-vs-cats/data | |
In our setup, we: | |
- created a data/ folder | |
- created train/ and validation/ subfolders inside data/ | |
- created cats/ and dogs/ subfolders inside train/ and validation/ | |
- put the cat pictures index 0-999 in data/train/cats |
-- | |
-- Read only | |
-- | |
-- Create a group | |
CREATE ROLE postgres_ro_group; | |
-- Grant access to existing tables | |
GRANT USAGE ON SCHEMA public TO postgres_ro_group; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO postgres_ro_group; |