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 <type_traits> | |
#include <tuple> | |
#include <utility> | |
// Expand type_traits to check is a type is a template specialization | |
template <template <class...> class Template, class T > | |
struct is_specialization_of : std::false_type {}; | |
template <template <class...> class Template, class... Args > | |
struct is_specialization_of<Template, Template<Args...>> : std::true_type {}; |
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
" setup for Vundle | |
set nocompatible | |
filetype off | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" let Vundle manage Vundle, required | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'rust-lang/rust.vim' | |
Plugin 'cespare/vim-toml' |
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> | |
#include <vector> | |
struct C { | |
C(int a, int b) : a_{a}, b_{b} { std::cout << "ctor" << std::endl; } | |
~C() { std::cout << "dtor" << std::endl; } | |
int a_; | |
int b_; | |
} __attribute__((packed)); |
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
extern crate rand; | |
use crate::dominion::CardKind; | |
use rand::thread_rng; | |
use rand::seq::SliceRandom; | |
type CardVec = Vec<&'static CardKind>; | |
#[derive(Debug)] | |
pub struct Player { |
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 python | |
# -*- coding: utf-8 -*- | |
def solution(T): | |
winter, summer = winter_split(T) | |
#print('winter', winter) | |
#print('summer', summer) | |
#assert set(winter).isdisjoint(set(summer)) | |
return len(winter) |
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 hdbscan import HDBSCAN | |
from sklearn import metrics | |
from sklearn.preprocessing import StandardScaler | |
import numpy as np | |
import scipy.spatial | |
import seaborn as sns | |
xy_lim = ((-60, 60), (0, 60)) | |
n = 12 |
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 hdbscan import HDBSCAN | |
from sklearn import metrics | |
from sklearn.preprocessing import StandardScaler | |
import numpy as np | |
import scipy.spatial | |
import seaborn as sns | |
xy_lim = ((-60, 60), (0, 60)) | |
n = 12 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
In [1]: import h5py | |
In [2]: f = h5py.File('../data/20160107-113037_sensor_data.h5', 'r') | |
In [3]: def p(x, obj): | |
...: try: | |
...: attrs = list(obj.attrs.items()) | |
...: if attrs: | |
...: print(x, attrs) | |
...: else: |