Skip to content

Instantly share code, notes, and snippets.

View winger's full-sized avatar

Vladislav Isenbaev winger

  • Facebook
  • Mountain View
View GitHub Profile
import torch
import numpy as np
from matplotlib import pyplot as plt
torch.set_printoptions(precision=10)
class ResidualBlock(torch.nn.Module):
def __init__(self, dims, bottleneck):
super(ResidualBlock, self).__init__()
self.linear1 = torch.nn.Linear(dims, bottleneck)
#pragma once
#include <iostream>
#include <algorithm>
#include <vector>
#include <unordered_map>
#include <string>
#include <variant>
using Key = std::string;
using Value = std::variant<std::string, double, bool>;
s = input()
prevs = dict()
a = []
for i in range(len(s)):
if s[i] in prevs:
a.append(i - prevs[s[i]])
else:
a.append(i + 1)
prevs[s[i]] = i
root = "cargo"
[packages]
[packages.bitflags]
dependencies = []
path = "/Users/winger/.cargo/registry/src/github.com-1ecc6299db9ec823/bitflags-0.1.1"
version = "0.1.1"
[packages.cargo]