Dual boot Ubuntu 18.04 and Windows 10
Windows occupies an 128GB ssd for gaming Ubuntu occupies a 256GB ssd and two same 1TB hdd with raid0 grouped by [bcache][3].
import gzip | |
import logging | |
import pickle | |
import time | |
import yaml | |
from tqdm import tqdm | |
def cached(cache_path): | |
def wrapper(func): |
import sys | |
import fire | |
class Beijing: | |
max_base = 28221 | |
min_base = 5360 | |
def __init__(self, total): | |
self.total = total | |
def wuxianyijin(self): |
''' | |
This proof-of-concept follows [PRML](https://www.microsoft.com/en-us/research/people/cmbishop/prml-book/)'s idea. | |
This code extends plain HMM in the way that it has different transition matrix and emission matrix on different features `xs`. | |
To get a normal HMM, you can set all `x` to the same. | |
`HMM.predict()` uses formula (13.44) in PRML, which considers the whole seen sequence of observation `y`s. | |
If you have no observed `y`s and only have `x`s, you can use `model.trans(x).view(T, N, self.H, self.H).softmax(dim=3)` as transition matrix to get predicted sequence. | |
`gamma` here represents posterior probability of hidden states. | |
''' |
from __future__ import print_function | |
import argparse | |
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import torch.optim as optim | |
from torchvision import datasets, transforms | |
import torchvision | |
class Net(nn.Module): |
import socket | |
import time | |
import copy | |
import struct | |
import socketserver | |
import select | |
####################################################################### | |
# package pyaes # | |
####################################################################### |
#include <limits> | |
#include <array> | |
#include <cassert> | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#define MO 998244353 | |
template <typename T, size_t rank> |
import mxnet as mx | |
from mxnet import nd, autograd | |
from mxnet.gluon import nn | |
from mxnet.gluon.contrib.nn import Identity, Concurrent | |
from mxnet import gluon | |
import logging | |
def d(a, b): | |
return (a - b).norm() |
#! /bin/bash | |
find -name '*.cpp' | sed -i 's/typeinfo\.h/typeinfo/g' | |
find -name '*.h' | sed -i 's/typeinfo\.h/typeinfo/g' | |
find -name '*.cpp' | python patch.py | |
find -name '*.h' | python patch.py | |
imps=$(find -name '*_implementation.h') |
#include "showbits.h" | |
#include <iostream> | |
#include <algorithm> | |
#include <string> | |
#include <locale> | |
#include <cassert> | |
typedef union { | |
int64_t i; |