Skip to content

Instantly share code, notes, and snippets.

@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 / .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 / .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 / 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 / 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 / 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 / .gitignore
Last active November 2, 2020 12:00
Python multiprocessing with timeout
/.idea/