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
git ls-files --exclude-standard | entr -p ./scp-git-file 'root@10.187.0.59' /_ |
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 | |
DIM = 4 # Dimension of matrix which represents the homography | |
IGNORE_DIM = 2 # This would be t on the blog post example | |
# We can't remove the last dim of the homography because it's | |
# special. | |
assert 0 <= IGNORE_DIM <= (DIM - 2) | |
assert IGNORE_DIM |
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 torch.utils.data as data | |
class SimpleDataset(data.Dataset): | |
def __init__(self): | |
super().__init__() | |
self.data = np.random.randn(1000, 5) | |
def __getitem__(self, idxs): |
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
from sklearn.base import BaseEstimator | |
import torchtuples as tt | |
class DeepSURVSklearnAdapter(BaseEstimator): | |
def __init__( | |
self, | |
learning_rate=1e-4, | |
batch_norm=True, |
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 pandas as pd | |
import holoviews as hv | |
from holoviews import opts | |
from bokeh.models import HoverTool | |
from holoviews import streams | |
hv.extension("bokeh") | |
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 fs from "fs" | |
export enum ByteEncoding { | |
Base64, | |
Hex, | |
} | |
export function hexToBuff(data: string): Buffer { | |
return Buffer.from(data, "hex"); | |
} |
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
\documentclass{article} | |
\usepackage{amsmath} | |
\begin{document} | |
Transformation matrix from $|jm>$ to $|m_1 m_2>$ basis | |
This is not the actual matrix; elements are represented as in the | |
CG tables. Do element-wise sqrt but keep the sign for the matrix. |
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 sympy as sp | |
import sympy.physics.quantum as spq | |
from sympy.matrices.dense import matrix_multiply_elementwise as mme | |
import numpy as np | |
import itertools | |
from fractions import Fraction | |
from argparse import ArgumentParser |
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 numpy.random import uniform | |
class MISER: | |
def __init__(self, miser_params): | |
""" | |
Parameters | |
---------- | |
MNBS : int | |
If less than MNBS evaluations are left we do | |
vanilla MC. |
NewerOlder