- ADAM: A METHOD FOR STOCHASTIC OPTIMIZATION https://arxiv.org/pdf/1412.6980.pdf
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 mhart/alpine-node:7 | |
| RUN apk update && apk upgrade \ | |
| && apk add \ | |
| bash \ | |
| ca-certificates \ | |
| chromium-chromedriver \ | |
| chromium \ | |
| coreutils \ | |
| ffmpeg \ |
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
| package main | |
| import ( | |
| πg "grumpy" | |
| π_os "os" | |
| ) | |
| func initModule(πF *πg.Frame, _ []*πg.Object) (*πg.Object, *πg.BaseException) { | |
| ßDemo := πg.InternStr("Demo") | |
| ß__metaclass__ := πg.InternStr("__metaclass__") | |
| ß__module__ := πg.InternStr("__module__") | |
| ß__name__ := πg.InternStr("__name__") |
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
| // Open `https://zh.wikipedia.org/wiki/%E8%8B%B1%E5%9C%8B%E5%9F%8E%E5%B8%82%E5%88%97%E8%A1%A8` in Chrome | |
| const regions = [ | |
| { | |
| // Eng | |
| id: 0, | |
| table: 7, | |
| }, | |
| { | |
| // NI | |
| id: 1, |
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
| # Extra gems: | |
| # Simple Rails app configuration | |
| gem 'figaro' | |
| # Easily include static pages | |
| gem 'high_voltage' | |
| # Paginator for Ruby webapps | |
| gem 'kaminari' | |
| # Simplified logger | |
| gem 'lograge' | |
| # File uploader |
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
| # Remove untagged images | |
| docker rmi $(docker images | grep "^<none>" | awk "{print $3}") | |
| # Remove images which are not depended by others | |
| docker images -q |xargs docker rmi | |
| # Refs: | |
| # https://forums.docker.com/t/command-to-remove-all-unused-images/20/3 | |
| # http://jimhoskins.com/2013/07/27/remove-untagged-docker-images.html |
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
| [ | |
| { | |
| "cn_name": "巴斯", | |
| "en_name": "Bath", | |
| "region_id": 0, | |
| "id": 1 | |
| }, | |
| { | |
| "cn_name": "伯明翰", | |
| "en_name": "Birmingham", |
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
| # set up ssh keys | |
| mkdir -p ~/.ssh | |
| touch ~/.ssh/authorized_keys | |
| # TODO: set up authorized_keys | |
| chmod 700 ~/.ssh | |
| chmod 644 ~/.ssh/authorized_keys | |
| # install zsh and oh-my-zsh | |
| sudo apt update && sudo apt-get install -y curl git zsh tmux wget # ripgrep |
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
| sudo apt-get install iftop |
This is a quick guide to install PostgreSQL 10 - tested on Ubuntu 16.04 but likely can be used for Ubuntu 14.04 and 17.04 as well, with one minor modification detailed below.
- Getting error: Peer authentication failed for user “postgres”, when trying to get pgsql working with rails: https://stackoverflow.com/questions/18664074/getting-error-peer-authentication-failed-for-user-postgres-when-trying-to-ge
- PostgreSQL: role is not permitted to log in https://stackoverflow.com/questions/35254786/postgresql-role-is-not-permitted-to-log-in
- In order to
gem install pg:apt-get install libpq-dev