Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# -*- mode: python; coding: utf-8-with-signature-dos -*- | |
## nickname: fakeymacs | |
## | |
## Windows の操作を emacs のキーバインドで行うための設定(Keyhac版)ver.20170629_01 | |
## | |
# このスクリプトは、Keyhac for Windows ver 1.75 以降で動作します。 | |
# https://sites.google.com/site/craftware/keyhac-ja | |
# スクリプトですので、使いやすいようにカスタマイズしてご利用ください。 |
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
import requests | |
class GitHubClient: | |
def __init__(self, apikey, session=None): | |
self.headers = {"Authorization": f"Bearer {apikey}"} | |
if not session: | |
self.sess = requests.Session() | |
else: | |
self.sess = session |
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 | |
# Prepare source list | |
cd /etc/apt/sources.list.d/ | |
sudo curl "http://archive.cloudera.com/director/ubuntu/trusty/amd64/director/cloudera-director.list" -O | |
sudo curl -s "http://archive.cloudera.com/director/ubuntu/trusty/amd64/director/archive.key" | sudo apt-key add - | |
# Install Java | |
sudo apt-get update | |
sudo apt install oracle-j2sdk1.8 |
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
import matplotlib as mlp | |
import pandas as pd | |
mlp.use("agg") | |
from matplotlib import pyplot as plt | |
from matplotlib.dates import ( | |
MonthLocator, | |
num2date, | |
AutoDateLocator, | |
AutoDateFormatter, |
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
#!/usr/bin/env ruby | |
# Forked from: http://hamasyou.com/blog/2014/02/13/movable-type-to-octopress/ | |
require 'date' | |
require 'mustache' | |
require 'stringex' | |
require 'cgi' | |
require 'reverse_markdown' |
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
devtools::install_github("crowding/msgpack-r") | |
library(msgpack) | |
x <- data.frame(a=1:3, b=4:6) | |
conn <- gzfile("test.msgpack.gz", open="w+b") | |
apply(x, 1, function(x) {writeMsg(c(x, time=as.integer(Sys.time())), conn)}) | |
flush(conn) | |
close(conn) |
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' |