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
#!/usr/bin/env python | |
""" | |
A script for make japanese slides by using markdown | |
""" | |
from tempfile import NamedTemporaryFile | |
from os import system, remove | |
from sys import exit | |
from optparse import OptionParser | |
from os.path import isfile |
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 copy import deepcopy | |
from math import sqrt | |
import numpy as np | |
from scipy import polyfit | |
from pylab import * | |
class SimpleAnalyser: | |
def __init__(self, datas): |
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 os import walk | |
from os.path import isfile, isdir | |
from sys import argv | |
from math import sqrt | |
import numpy as np | |
from progressbar import ProgressBar, Percentage, Bar | |
from PIL import Image | |
MAX_SIZE = 1000 |
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
""" | |
A very simple 'animation' of a 3D plot | |
""" | |
from mpl_toolkits.mplot3d import axes3d | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import time | |
def generate(X, Y, count=10): |
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 yaml import load as _yaml_load | |
from sys import argv | |
from numpy import std | |
archives = _yaml_load(open('archives.yml')) | |
class VimrcStat(): | |
def __init__(self, member_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
-- n is a square number or not | |
isSquare:: Int -> Bool | |
isSquare n = t*t == n | |
where t = round(sqrt (fromIntegral(n))) | |
-- "n = c*c + (n-c*c)" is square split or not | |
isSquareSplit:: Int -> Int -> Bool | |
isSquareSplit n c = isSquare (n - c*c) | |
-- return whether n is splittable as two square number or not |
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
require 'fileutils' | |
BASE_FILENAME = 'basefilename' | |
AUTHOR = 'yassu' | |
LATEX = 'latex' | |
DVIP = 'dvipdfm' | |
VIEW = 'evince' | |
def get_last_tag() |
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
\documentclass{article} | |
\usepackage{amsmath, amssymb} | |
\usepackage{amsthm} | |
\newcommand{\RR}{\mathbf{R}} | |
\begin{document} | |
We define diffeomorphism $\phi \colon \RR^2 \to \RR^2$ by identify: | |
\[ | |
\phi(x, y) = (x, y). | |
\] |
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 timeit import timeit | |
N = 10**9 | |
eq_plus = """ | |
a = 1 | |
a += 2 | |
""" | |
subst_plus = """ |