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 torch | |
from typing import Tuple, Callable | |
def do_nothing(x: torch.Tensor, mode:str=None): | |
return x | |
def mps_gather_workaround(input, dim, index): | |
if input.shape[-1] == 1: |
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 argparse | |
import torch | |
import numpy as np | |
from tqdm import tqdm | |
parser = argparse.ArgumentParser(description="Merge models with weighted similarity") | |
parser.add_argument("a", type=str, help="Path to model a") | |
parser.add_argument("b", type=str, help="Path to model b") | |
parser.add_argument("--out", type=str, help="Output file name, without extension", default="merged", required=False) |
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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"github.com/recoilme/clean" | |
. "github.com/stevelacy/daz" | |
) |
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
package main | |
import ( | |
"bufio" | |
"log" | |
"os" | |
ljpg "github.com/pixiv/go-libjpeg/jpeg" | |
) |
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
package main_test | |
import ( | |
"strconv" | |
"testing" | |
"github.com/cespare/xxhash" | |
"github.com/spaolacci/murmur3" | |
) |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"log" | |
"net" | |
) | |
// mac: brew install vowpal-wabbit |
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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"strings" | |
"time" | |
) | |
// Server is a HTTP interface |
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
{"cmdline": ["/usr/local/b52","-p","11212","-slave","someip:11212","-loops","-1","-params","sizelru=1024\u0026dbdir=/var/lib/somedir"],"memstats": {"Alloc":1376075872,"TotalAlloc":3064795276440,"Sys":1814112504,"Lookups":0,"Mallocs":10459923703,"Frees":10459790273,"HeapAlloc":1376075872,"HeapSys":1736605696,"HeapIdle":348364800,"HeapInuse":1388240896,"HeapReleased":37822464,"HeapObjects":133430,"StackInuse":8224768,"StackSys":8224768,"MSpanInuse":1040264,"MSpanSys":3211264,"MCacheInuse":55552,"MCacheSys":65536,"BuckHashSys":1722223,"GCSys":58826752,"OtherSys":5456265,"NextGC":1651137302,"LastGC":1573573520429522192,"PauseTotalNs":907269193,"PauseNs":[38559,41868,45578,71952,39489,37591,56100,41930,51938,50999,56712,53932,51550,41156,45520,60234,35935,52250,48101,86082,52070,53983,32345,54403,35896,38617,111902,144605,47452,40141,35223,52007,51257,74409,107788,38392,84990,85595,41260,65704,47984,77121,39105,112070,37919,41408,92024,31839,95383,33065,34490,42069,34207,52734,41615,40328,44085,48865,40548,63130,9 |
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
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"os" | |
"runtime" | |
"time" | |
"encoding/json" |
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
package main | |
import ( | |
"errors" | |
"flag" | |
"fmt" | |
"log" | |
"net" | |
"net/textproto" | |
"os" |