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
## Imports | |
from typing import Tuple | |
import torch | |
from torch import Module, Tensor | |
from transformers.models.roberta.modeling_roberta import RobertaPreTrainedModel, RobertaConfig, RobertaModel, RobertaEncoder | |
from torch.nn import CrossEntropyLoss, CosineEmbeddingLoss | |
## Function |
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
[ | |
"at t", | |
"molecole", | |
"enquiret", | |
"fairphone", | |
"ラスタバナナ", | |
"dcenta", | |
"caoy", | |
"sonim", | |
"jensa", |
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
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Realtime WebSocket Audio Streaming</title> | |
<style> | |
body { | |
background-color: black; | |
color: green; | |
} |
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
1 | |
00:00:01,231 --> 00:00:02,072 | |
係喇咁,好咁 | |
2 | |
00:00:02,072 --> 00:00:03,613 | |
咁或者我簡單 | |
3 | |
00:00:03,613 --> 00:00:04,735 |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Office Layout</title> | |
<style> | |
.room { | |
width: 250px; | |
height: 350px; |
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 { NextApiRequest, NextApiResponse } from "next"; | |
export default async function handler(req: NextApiRequest, res: NextApiResponse) { | |
const periods = [1, 7, 14, 30]; | |
const output = {}; | |
for (let j = 0; j < periods.length; j++) { | |
const period = periods[j]; |
OlderNewer