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]; |
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
| <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
| [ | |
| "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
| ## 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
| import requests | |
| en_content = requests.get('https://www.google.com/basepages/producttype/taxonomy-with-ids.en-US.txt') | |
| def load_taxonomy_hierarchy(root, taxonomy_content, is_root): | |
| lines = taxonomy_content.split('\n') | |
| filtered_lines = lines[1:] | |
| filtered_lines = list(filter(lambda line: len(line) > 0, filtered_lines)) | |
| # extract the root taxonomy from content | |
| root_taxonomy_set = set() | |
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
| kubeadm reset | |
| ## master only | |
| etcdctl rm --recursive registry | |
| rm -rf /var/lib/cni | |
| rm -rf /run/flannel | |
| rm -rf /etc/cni |
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
| // pages/api/webhooks/github.js | |
| const { exec } = require("child_process"); | |
| const crypto = require("crypto"); | |
| // Handle GitHub Webhooks | |
| export default function handler(req, res) { | |
| try { | |
| console.log("Incoming Request"); | |
| if (req.method !== 'POST') { | |
| res.send(404); |
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
| forfiles /S /M *.ext1 /C "cmd /c rename @file @fname.ext2" |
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
| apt install wget | |
| wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.tgz | |
| tar xvzf ngrok-stable-linux-amd64.tgz -C /usr/local/bin |
NewerOlder