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
# -*- coding: utf-8 -*- | |
import os | |
import tiktoken | |
import time | |
import multiprocessing | |
working_dir = os.path.dirname(os.path.realpath(__file__)) | |
dataset = 'data' | |
ws = 512*1024*1024 # 128k per chunk |
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
/interface bridge | |
add name=GUEST protocol-mode=none | |
add name=LAN protocol-mode=none | |
/interface ethernet | |
set [ find default-name=ether1 ] name=ISP1-NLS | |
set [ find default-name=ether2 ] name=ISP2-BLN | |
/ip pool | |
add name=dhcp_pool0 ranges=10.202.100.51-10.202.100.249 | |
add name=guest_pool0 ranges=192.168.1.100-192.168.1.200 | |
/ip dhcp-server |
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
BSIZE = 4 | |
HSIZE = 32 | |
def xor(xs, ys): | |
if type(ys)==list: | |
return [x^y for x, y in zip(xs, ys)] | |
else: | |
return [(x^ys)%256 for x in xs] | |
def hsm(data): |