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 bs4 import BeautifulSoup | |
from sys import argv | |
import re | |
if (len(argv) < 2): | |
print('Usage: python {} filename'.format(argv[0])) | |
quit() | |
target_html = open(argv[1]) |
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
# Borrowed from Java code https://spark.apache.org/docs/2.1.0/ml-features.html#n-gram | |
# and ml_lda https://github.com/rstudio/sparklyr/blob/9c830cecf3a91de0857dc33ef3b375c2f922ddd1/R/ml_lda.R#L15-L28 | |
library(janeaustenr) | |
library(sparklyr) | |
library(dplyr) | |
## Configure cluster | |
config <- spark_config() | |
config$spark.driver.cores <- 2 |
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
# | |
# Sphinx extension to flush bibliography forcely (for LaTeX) | |
# | |
# Original code written by tk0miya: https://gist.github.com/5886e3f5fb86bd312fd784a7a7b57884 | |
# | |
# Usage: | |
# 1. Write `.. bibliography::` where you want to flash citation. In this case, we assume all citations are in `bib.rst` | |
# 2. put this file into `ext` directory | |
# 3. Modify conf.py. See also source/conf.py | |
# 4. Add `postface.rst` into your `index.rst` after citation rst |
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
#!/bin/bash | |
set -ex | |
DIRECTOR_HOST=<REPLACE_YOUR_DIRECTOR_HOST> | |
GATEWAY_HOST=<REPLACE_YOUR_INTERNAL_GATWAY_HOST> | |
# Foward to your RStudio Server on gateway | |
#ssh -N -f -L 8787:$GATEWAY_HOST:8787 centos@$DIRECTOR_HOST | |
autossh -f -M 20010 -N -L 8787:$GATEWAY_HOST:8787 centos@$DIRECTOR_HOST | |
#ssh -f -CND 8157 centos@$DIRECTOR_HOST |
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
target_packages = File.open("target_packages").read.split("\n") | |
puts '#/usr/bin/env ruby' | |
STDIN.each_line do |line| | |
m = line.match(/href="((.+?)_(.+?)\.tar\.gz)"/) | |
next unless m | |
file_name = m[1] | |
package_name = m[2] | |
version = m[3] |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
source 'https://rubygems.org' | |
gem 'nokogiri', '~>1.6' | |
gem 'aws-sdk', '~> 2' |
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
diff --git a/Makefile.in b/Makefile.in | |
index 9ff4015..2da1c60 100644 | |
--- a/Makefile.in | |
+++ b/Makefile.in | |
@@ -885,7 +885,7 @@ uninstall-am: uninstall-dist_resourceDATA \ | |
.PRECIOUS: Makefile | |
- | |
+.NOTPARALLEL: |
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
name: aki-client | |
provider { | |
type: aws | |
accessKeyId: ${?AWS_ACCESS_KEY_ID} | |
secretAccessKey: ${?AWS_SECRET_ACCESS_KEY} | |
region: ap-northeast-1 | |
subnetId: subnet-fdec2b8b |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.