Skip to content

Instantly share code, notes, and snippets.

View xeno14's full-sized avatar

Ryo Murakami xeno14

View GitHub Profile
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.
@xeno14
xeno14 / mix.py
Last active December 31, 2015 10:14
#!/usr/bin/env python
# -*- coding: utf-8 -*-
fa = open("a.txt", "r")
fb = open("b.txt", "r")
for a, b in zip(fa, fb):
print a.rstrip()
print b.rstrip()
fa.close()
fb.close()
@xeno14
xeno14 / ipython-notebook.service
Last active November 11, 2015 13:05 — forked from amitsaha/ipython-notebook.service
Run IPython notebook under systemd
# README:
# Copy this file to /usr/lib/systemd/system/
# sudo systemctl daemon-reload
# systemctl enable ipython-notebook
# systemctl start ipython-notebook
# The WorkingDirectory and ipython-dir must exist
# If you don't want anything fancy, go to http://127.0.0.1:8888 to see your notebook
# wheneber you want it
[Unit]
@xeno14
xeno14 / .nvimrc
Last active August 29, 2015 14:27
minimized nvimrc with lightline
"----------------------------------------------------
" appearance
"----------------------------------------------------
"
syntax on
set laststatus=2
set t_Co=256
" colorscheme desert
@xeno14
xeno14 / gist:6188291aedcb2cd2dc15
Created June 15, 2015 14:30
Compile-time calculation of Pi
#include <cstdio>
#include <ratio>
template <typename R, intmax_t N>
struct ratio_pow {
using prev = typename ratio_pow<R, N-1>::value;
using value = std::ratio<R::num * prev::num, R::den * prev::den>;
};
template <typename R>