This file contains 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
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): |
This file contains 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
#ifndef __KTNYT_THREAD_POOL_HPP__ | |
#define __KTNYT_THREAD_POOL_HPP__ | |
#include <thread> | |
#include <functional> | |
#include <mutex> | |
#include <condition_variable> | |
#include <queue> | |
#include <vector> |
This file contains 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
#ifndef __KTNYT_SORTED_MAP_HPP__ | |
#define __KTNYT_SORTED_MAP_HPP__ | |
#include <utility> | |
#include <vector> | |
namespace ktnyt { | |
namespace detail { | |
template <class C, bool> struct sorted_map_brace_impl; |
This file contains 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
define-command -params 1 -shell-script-candidates %{ | |
if [ -d .git ]; then | |
alias list='git ls-files --exclude-standard -co' | |
{ list | xargs -n1 dirname | sort | uniq | perl -ple '$_.="/"'; list | sort; } | fzy -e "$1" | |
else | |
find . -type f -or -type d | fzy -e "$1" | |
fi | |
} fzy-edit %{ | |
edit %arg{1} | |
} |
This file contains 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
import numpy as np | |
import theano | |
import theano.tensor as T | |
class RAE(object): | |
def __init__(self, input, rng, d, W=None, b=None, U=None, c=None): | |
dv = d | |
dh = d * 2 | |
self.dv = dv |
This file contains 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
define-command -hidden -override c-family-insert-include-guards %{ | |
evaluate-commands %sh{ | |
case "${kak_opt_c_include_guard_style}" in | |
ifdef) | |
echo 'execute-keys ggi__<c-r>%__<ret><esc>gg/include/<ret>dggxs(/|\.)<ret>c_<esc><space>x~ggxyppI#ifndef<space><esc>jI#define<space><esc>jI#endif<space><space>//<space><esc>O<ret><ret><esc>' | |
;; | |
pragma) | |
echo 'execute-keys ggi#pragma<space>once<esc>' | |
;; | |
*);; |
This file contains 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
# Generic Settings | |
hook global InsertChar k %{ try %{ | |
exec -draft hH <a-k>jk<ret> d | |
exec <esc> | |
}} | |
hook global WinDisplay .* info-buffers | |
hook global WinCreate ^[^*]+$ %{ add-highlighter window/ number-lines -separator ' ' } | |
# Mappings |
This file contains 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
#include QMK_KEYBOARD_H | |
// #include "flip_keymap.h" | |
extern keymap_config_t keymap_config; | |
#define BASE 0 | |
#define META 1 | |
#define RGB 2 | |
// Fillers to make layering more clear |
This file contains 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
#ifndef __KTNYT_ASSOCVEC_HPP__ | |
#define __KTNYT_ASSOCVEC_HPP__ | |
#include <functional> | |
#include <memory> | |
#include <utility> | |
#include <vector> | |
namespace ktnyt { |