Skip to content

Instantly share code, notes, and snippets.

@tell
tell / .gitignore
Last active November 2, 2020 12:00
Python multiprocessing with timeout
/.idea/
@tell
tell / check-layput_list.tex
Created March 15, 2020 04:18
Check layout
% -*- coding: utf-8 -*-
\clearpage
These are debug outputs and must be deleted before submission.
\begin{enumerate}
\item topsep: \the\topsep
\item partopsep: \the\partopsep
\item parsep: \the\parsep
\item itempsep: \the\itemsep
\item leftmargin: \the\leftmargin
@tell
tell / Makefile
Last active October 19, 2019 01:45
Memory consumption on sieving implementations
.DEFAULT_GOAL := do
.PHONY: do
do: sieving-mem.pdf
.PHONY: clean-log
clean-log:
$(RM) fit-log_*
sieving-mem.pdf: sieving-mem.plot sieving-mem.gpdata
$(MAKE) clean-log
gnuplot $<
@tell
tell / NTL_to_JSON.bash
Created April 23, 2018 02:44
Convert NTL Matrix to JSON
#!/usr/bin/env bash
# vim: set expandtab :
# Convert NTL Matrix to JSON.
cat - \
| tr "\n" " " \
| sed -e 's/ \]/\]/g' \
-e 's/ *$//g' \
-e 's/ /,/g' \
@tell
tell / .gitignore
Last active February 18, 2017 15:17
A sample of extern
### https://raw.github.com/github/gitignore/f2ce448f2ba7a092da05482ceca99209127c0884/c++.gitignore
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
@tell
tell / .gitignore
Last active December 18, 2016 13:01
Java Properties like map on C++
### https://raw.github.com/github/gitignore/afbff9027d02ccfc680e031f6c295f79ad61662d/C++.gitignore
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
@tell
tell / vector_space.sage
Last active October 2, 2016 06:37
A memo for defining new derived class of the Element on SageMath
# -*- coding: utf-8 -*-
# vim: set ft=python expandtab :
class MyVecSpace(Parent):
def __init__(self, base, dim=None):
Parent.__init__(self, category=CommutativeAdditiveGroups().Finite())
self._base = base
self._dim = dim if dim is not None else 1
def _repr_(self):
@tell
tell / jlatexdiff.sh
Created June 3, 2016 08:10 — forked from sky-y/jlatexdiff.sh
jlatexdiff: latexdiffを日本語LaTeX文書でうまく扱えるようにする 参考:http://blogs.yahoo.co.jp/pentainformation/28571072.html
#!/bin/bash
# jlatexdiff: latexdiffを日本語LaTeX文書でうまく扱えるようにする
# 参考:http://blogs.yahoo.co.jp/pentainformation/28571072.html
# 実行時に指定された引数の数、つまり変数 $# の値が 2 でなければエラー終了
if [ $# -ne 2 ]; then
echo "指定された引数は$#個です." 1>&2
echo "実行するには2個の引数が必要です." 1>&2
echo "jlatexdiff [old file name] [new file name]" 1>&2
@tell
tell / threads.h
Created June 2, 2016 14:38 — forked from yohhoy/threads.h
C11 <threads.h> emulation library
/*
* C11 <threads.h> emulation library
*
* (C) Copyright yohhoy 2012.
* Distributed under the Boost Software License, Version 1.0.
* (See copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef EMULATED_THREADS_H_INCLUDED_
#define EMULATED_THREADS_H_INCLUDED_
@tell
tell / README.md
Last active May 24, 2016 07:12
Python logging on the socket