docker run -d --name strahov -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=yes mysql
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
# You must set this file into .elasticbeanstalk direcotry like this; | |
# .elasticbeanstalk/config.yaml | |
branch-defaults: | |
default: | |
environment: api-env | |
environment-defaults: | |
api-env: | |
branch: null | |
repository: null |
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
version: 0.2 | |
phases: | |
pre_build: | |
commands: | |
- pip install -r my-api/requirements.txt | |
build: | |
commands: | |
- python -m unittest discover -s my-api | |
artifacts: |
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
data = pd.read_json('data.json') | |
data.groupby(['id', 'product_id']).nunique().sort_values(by='align_id', ascending=False) |
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
'use strict'; | |
var watchify = require('watchify'); | |
var browserify = require('browserify'); | |
var gulp = require('gulp'); | |
var source = require('vinyl-source-stream'); | |
var buffer = require('vinyl-buffer'); | |
var gutil = require('gulp-util'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var assign = require('lodash.assign'); |
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 execute(sql, *args) | |
begin | |
ps = @db.prepare(sql) | |
ps.bind_params *args | |
res = ps.execute | |
rescue => e | |
raise(e) | |
ensure | |
ps.close | |
end |