Skip to content

Instantly share code, notes, and snippets.

@kotakanbe
kotakanbe / mohikan_slack_channels.md
Last active November 22, 2024 11:30
モヒカンslack( https://mohikan.slack.com )のチャネルリスト
@Nymphium
Nymphium / README.md
Last active February 18, 2016 07:51
functional programming langageか?

untyped

$ rlwrap ./repl.moon
> p = \x \y \z + <x, +<y, z>>
> print (p 3 4 5)
12
> -- comment
&gt;
@erantapaa
erantapaa / exact-cover.md
Last active October 6, 2015 16:50
using set-exact

This is a quick tutorial on how to use the set-cover package to solve exact cover problems.

Exact Cover Problems

Given a set X and collection of subsets of X, S, the exact cover problem asks if there is a sub-collection S' of S s.t. the subsets in S' are pairwise disjoint and their union equals X.

@ktnyt
ktnyt / conv_dae.py
Last active August 29, 2015 14:24
FunctionSet model for Chainer based Convolutional Denoising Autoencoder
class ConvolutionalAutoencoder(FunctionSet):
def __init__(self, n_in, n_out, ksize, stride=1, pad=0, wscale=1, bias=0, nobias=False):
super(ConvolutionalAutoencoder, self).__init__(
encode=F.Convolution2D(n_in, n_out, ksize, stride=stride, pad=pad, wscale=wscale, bias=bias, nobias=nobias),
decode=F.Convolution2D(n_out, n_in, ksize, stride=stride, pad=pad, wscale=wscale, bias=bias, nobias=nobias)
)
def forward(self, x_data, train=True):
x = Variable(x_data)
t = Variable(x_data)
@ktnyt
ktnyt / chainer_ca.py
Last active August 10, 2020 17:41
Refactored code for a Convolutional Autoencoder implemented with Chainer.
import argparse
import numpy as np
from chainer import Variable, FunctionSet, optimizers, cuda
import chainer.functions as F
import cv2
import random
import cPickle as pickle
import sys
class ConvolutionalAutoencoder(FunctionSet):
@stefanozanella
stefanozanella / html5mathjax.cfg
Last active March 7, 2023 22:10
Custom tex4ht (htlatex) configuration, so that it generates HTML5 code with MathJax rendering
% We are generating HTML + MathML code
\Preamble{xhtml,mathml}
% We don't want to translate font suggestions with ugly wrappers like
% <span class="cmti-10"> for italic text
\NoFonts
% Don't output xml version tag
\Configure{VERSION}{}