Complete guide on how to deploy a node app in an Ubuntu server using flightplan can be found here:
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'), | |
async = require('async'); | |
var base = 'https://www.npmjs.org', | |
concurrency = 2; | |
var q = async.queue(function(task, next) { | |
setTimeout(function() { | |
console.log('GET ' + task.url); |
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
# function needed for visualization purposes | |
sigmoid = function(params, x) { | |
params[1] / (1 + exp(-params[2] * (x - params[3]))) | |
} | |
x = 1:53 | |
y = c(0,0,0,0,0,0,0,0,0,0,0,0,0,0.1,0.18,0.18,0.18,0.33,0.33,0.33,0.33,0.41, | |
0.41,0.41,0.41,0.41,0.41,0.5,0.5,0.5,0.5,0.68,0.58,0.58,0.68,0.83,0.83,0.83, | |
0.74,0.74,0.74,0.83,0.83,0.9,0.9,0.9,1,1,1,1,1,1,1) |
Instructions of how to set-up environments etc.
Checkout all the packages in the default conda environment:
conda list
Upgrading conda and packages:
conda upgrade conda
conda upgrade --all
Installing packages examples:
Accessible from the web: http://hostname:8081 through mongo-express and you can connect with a mongodb client like robo 3T in hostname:27017
.
To run:
docker-compose -f mongo.yml up
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
{ | |
"ignore": [ | |
"**/deps/**", | |
"**/node_modules/**", | |
"**/thirdparty/**", | |
"**/third_party/**", | |
"**/bower_components/**", | |
"**/vendor/**", | |
"**/vendors/**", | |
"**/**-min-**", |
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
from multiprocessing import Pool | |
import redis | |
import math | |
import json | |
from random import seed | |
from random import gauss | |
# Atomic operations | |
def sum(x): | |
r = redis.Redis(host='localhost', port=6379, db=0) |
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
# editorconfig.org | |
root = true | |
[*] | |
indent_style = space | |
indent_size = 2 | |
end_of_line = lf | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
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
const Octokit = require('@octokit/rest') | |
const rp = require('request-promise') | |
const fs = require('fs') | |
function sleep (ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)) | |
} | |
const baseUrl = 'https://api.github.com' | |
const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN }) |
OlderNewer