This file contains hidden or 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 <iostream> | |
| template<int N> | |
| struct fibo_result { int val = N; }; | |
| template<int ...Ns> | |
| struct fibo_impl; | |
| template<int a, int b, int I, int ...Ns> | |
| struct fibo_impl<a, b, I, I, Ns...> |
This file contains hidden or 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
| #!/usr/bin/env python3 | |
| import sys | |
| import clang.cindex | |
| INDENT = 4 | |
| K = clang.cindex.CursorKind | |
| def is_std_ns(node): | |
| return node.kind == K.NAMESPACE and node.spelling == 'std' |
This file contains hidden or 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
| ;;; packages.el --- lsp-cquery layer packages file for Spacemacs. | |
| ;; | |
| ;; Copyright (c) 2012-2017 Sylvain Benner & Contributors | |
| ;; | |
| ;; Author: Shen Chao <scturtle@Enigma.lan> | |
| ;; URL: https://github.com/syl20bnr/spacemacs | |
| ;; | |
| ;; This file is not part of GNU Emacs. | |
| ;; | |
| ;;; License: GPLv3 |
This file contains hidden or 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
| icon_gravity E | |
| geometry 5x1-0+0 | |
| max_geometry 5x1-0+0 | |
| background "#000000" | |
| icon_size 20 | |
| kludges force_icons_size | |
| skip_taskbar |
This file contains hidden or 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
| from __future__ import print_function | |
| import numpy as np | |
| from scipy.stats import norm | |
| import matplotlib.pyplot as plt | |
| import tensorflow as tf | |
| import tensorflow.contrib.layers as tfl | |
| import tensorflow.contrib.framework as tff | |
| def minibatch(features): | |
| size_a, size_b, size_c = features.get_shape()[1], 3, 3 |
This file contains hidden or 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 | |
| from scipy.stats import norm | |
| import matplotlib.pyplot as plt | |
| import matplotlib.animation as animation | |
| from matplotlib.patches import Arrow, Circle | |
| fig = plt.figure("pf", figsize=(7., 7.)) | |
| ax = fig.gca() | |
| landmarks = [[20., 20.], [20., 50.], [20., 80.], |
This file contains hidden or 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
| from __future__ import print_function | |
| import string | |
| import zipfile | |
| import numpy as np | |
| import tensorflow as tf | |
| import tensorflow.contrib.layers as layers | |
| class BatchGenerator: | |
| def __init__(self, text, vocabulary, batch_size, num_unrollings): |
This file contains hidden or 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 matplotlib.pyplot as plt | |
| from mpl_toolkits.mplot3d import Axes3D | |
| from transforms3d import euler | |
| fig = plt.figure() | |
| ax = fig.gca(projection='3d') | |
| p1 = np.zeros((3, 100)) | |
| p1[0, :] = np.linspace(1, 3, 100) |
This file contains hidden or 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 numpy.linalg as npl | |
| from easydict import EasyDict | |
| opts = EasyDict(dict(max_iter=10, eps1=1e-8, eps2=1e-8)) | |
| def fJ(x, p, y=0): | |
| f = p[0] * np.exp(- (x - p[1]) ** 2 / (2 * p[2] ** 2)) | |
| J = np.empty((p.size, x.size), dtype=np.float) | |
| J[0, :] = f / p[0] |
This file contains hidden or 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 | |
| from numpy.linalg import inv | |
| import matplotlib.pyplot as plt | |
| delta_t = 0.1 | |
| t = np.arange(0, 5, delta_t) | |
| n = len(t) | |
| # 加速度 | |
| g = 10 | |
| # 真实位置 |