Skip to content

Instantly share code, notes, and snippets.

View mujjingun's full-sized avatar

Daniel Geon Park mujjingun

  • KAIST
  • Seoul
View GitHub Profile
@mujjingun
mujjingun / PCP.cpp
Last active April 29, 2020 14:50
Undecidable C++ Grammar Example
#include <algorithm>
#include <type_traits>
template <int... Ints>
struct Row {
constexpr static bool empty = (sizeof...(Ints) == 0);
};
template <typename Upper, typename Lower>
struct Domino {
#include <string>
int main() {
std::string a;
a = "Hello World!";
}
#include <string>
int main() {
std::string a = "Hello World!";
}
int main() {
int a = 10;
}
int main() {
int a;
a = 10;
}
template<typename T, int first, int... dims>
struct arr_wrap {
static int sfinae[sizeof...(dims) > 0];
using type = typename arr_wrap<typename arr_wrap<T, dims...>::type, first>::type;
};
template<typename T, int n>
struct arr_wrap<T, n> {
using type = T[n];
@mujjingun
mujjingun / mdn_demo_theano.py
Created August 31, 2016 03:20
Mixture Density Network(MDN) implemenation in Theano
# -*- coding: utf-8 -*-
"""
Created on Mon Aug 22 00:36:48 2016
@author: park
"""
#%% train
import theano