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 sys | |
| from multiprocessing import Pool, Manager | |
| extract_family_range = [1, 15] | |
| family_folder_path = '/home/master/r07725027/dataset/aries_v2_simplified_15up' | |
| output_path_root = "/home/master/r07725027/dataset/rasMMA-output" | |
| pickle_dir = '' | |
| families = os.listdir(family_folder_path) |
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
| const express = require('express'); | |
| const bodyParser = require('body-parser'); | |
| var app = express(); | |
| // parse setting | |
| app.use(bodyParser.json()); | |
| app.use(bodyParser.urlencoded({extended: false})); | |
| app.get('/api', (req, res) => { |
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
| #! /bin/bash | |
| IMAGE_NAME=node_api | |
| # run container | |
| run () { | |
| docker run --name ${IMAGE_NAME} -d -p 3000:3000 ${IMAGE_NAME} | |
| } | |
| # stop and remove container |
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
| FROM node:8 | |
| WORKDIR /usr/src/app | |
| ADD . /usr/src/app | |
| RUN npm install | |
| CMD ["npm", "test"] |
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
| FROM node:8 | |
| WORKDIR /usr/src/app | |
| ADD . /usr/src/app | |
| RUN npm install | |
| EXPOSE 3000 | |
| CMD ["npm", "start"] |
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
| const chai = require('chai'); | |
| const chaiHttp = require('chai-http'); | |
| const should = chai.should(); | |
| const app = require('../server'); | |
| chai.use(chaiHttp); | |
| describe('/api', () => { | |
| describe('/GET', () => { |
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
| const chai = require('chai'); | |
| const chaiHttp = require('chai-http'); | |
| const should = chai.should(); | |
| const app = require('../server'); | |
| chai.use(chaiHttp); | |
| describe('/api', () => { | |
| describe('/GET', () => { |
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
| const express = require('express'); | |
| const bodyParser = require('body-parser'); | |
| var app = express(); | |
| // parse setting | |
| app.use(bodyParser.json()); | |
| app.use(bodyParser.urlencoded({extended: false})); | |
| app.get('/api', (req, res) => { |
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
| from flask import Flask | |
| from redis import Redis, RedisError | |
| import os | |
| import socket | |
| # Connect to Redis | |
| redis = Redis(host="redis", db=0, socket_connect_timeout=2, socket_timeout=2) | |
| app = Flask(__name__) | |
| @app.route("/") |
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
| #! /bin/bash | |
| # run container | |
| run () { | |
| docker run --name python -d -p 80:80 python_test | |
| } | |
| # stop and remove container | |
| stop_rm () { | |
| docker stop python | |
| docker rm python | |
| } |
NewerOlder