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 re | |
import sys | |
import numpy as np | |
import numba | |
file_name = sys.argv[1] # one document per line | |
num_topics = int(sys.argv[2]) | |
num_iterations = int(sys.argv[3]) | |
alpha = float(sys.argv[4]) | |
alpha0 = float(sys.argv[5]) |
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" | |
"log" | |
"net/http" | |
) | |
func main() { | |
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { |
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
class foo: | |
def __eq__(self, o): | |
return False | |
t = (foo(),) | |
t2 = (t[0],) | |
t == t2 # True | |
t[0] == t2[0] # False | |
t[0] is t2[0] # 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
# Reproducing Roblox DistilBERT Medium Post | |
# https://blog.roblox.com/2020/05/scaled-bert-serve-1-billion-daily-requests-cpus/ | |
# | |
# 1. Launch C5 12xlarge with Deep Learning AMI (Ubuntu 18.04) Version 32.0 (ami-0dc2264cd927ca9eb) | |
# 2. pip install transformers[torch] | |
# 3. python reproduce_roblox_distilbert.py | |
import timeit | |
from transformers import DistilBertTokenizerFast, \ | |
DistilBertForSequenceClassification |
OlderNewer