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
def requir(path) | |
source = "#{path}.rb" | |
compiled = "#{source}c" | |
if File.exists? compiled | |
bin = File.binread compiled | |
bytecode = RubyVM::InstructionSequence.load_from_binary(bin) | |
elsif File.exist? source | |
bytecode = RubyVM::InstructionSequence.compile_file(source) | |
File.binwrite compiled, bytecode.to_binary | |
else |
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
a = {1, 0} | |
b = {a, a} | |
c = {b, b} | |
d = {c, c} | |
e = {d, d} | |
f = {e, e} | |
g = {f, f} | |
h = {g, g} | |
i = {h, h} | |
j = {i, i} |
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 os | |
import tqdm | |
import gzip | |
import torch | |
import tarfile | |
import logging | |
from datetime import datetime | |
from torch.utils.data import DataLoader | |
from sentence_transformers import InputExample, LoggingHandler, util | |
from sentence_transformers.cross_encoder import CrossEncoder |
OlderNewer