VSCode CLIをサーバーにインストールすることで、SSHを経由することなくVSCodeやvscode.dev上からサーバーにアクセスすることができる様になる
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
function sendNotification() { | |
const webhookUrl = PropertiesService.getScriptProperties().getProperty('WEBHOOK_URL'); | |
const spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); | |
const sheet = spreadsheet.getSheetByName("日程表"); | |
const lastRow = sheet.getLastRow(); | |
const values = sheet.getRange(`A2:B${lastRow}`) | |
.getValues(); | |
function convertToMessage(values) { |
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
#include <iostream> | |
#include <ctime> | |
#include <cuda_runtime.h> | |
#define MEGA_BYTE (1'000'000) | |
const int N = 100 * MEGA_BYTE; // Size of data | |
const int numIterations = 100; // iteration | |
// CUDA error check macro |
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
// main.ts | |
import { serve } from "https://deno.land/std/http/server.ts"; | |
const target = "https://example.com"; // destination URL | |
const port = 8000; | |
async function handleRequest(req: Request): Promise<Response> { | |
const url = new URL(req.url); | |
const targetUrl = `${target}${url.pathname}${url.search}`; | |
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
/** | |
* | |
* @param targetFunc fetch function | |
* @param opt retry options | |
* @returns | |
*/ | |
export const retryFetch = <T>( | |
targetFunc: () => Promise<T>, | |
opt?: { | |
retryCount?: number; |
FCCpx
is a cross compiler for login node. So if you build boost on computation nodes, you should replace FCCpx
command with FCC
.
VARIANT="1_83_0"; \
wget "https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_${VARIANT}.tar.gz" && \
tar xvf "boost_${VARIANT}.tar.gz" && \
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 argparse | |
from safetensors import safe_open | |
import torch | |
parser = argparse.ArgumentParser(description='Compare two safetensors') | |
parser.add_argument('tensor1', type=str, help='First tensor to compare') | |
parser.add_argument('tensor2', type=str, help='Second tensor to compare') | |
args = parser.parse_args() |
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
/* | |
* Run `cc -Wall -Wextra -fopenmp -O3 cilksort.c -o cilksort` to compile. | |
* Recommend to use clang over gcc for performance. | |
*/ | |
/* | |
* Original code from the Cilk project | |
* | |
* Copyright (c) 2000 Massachusetts Institute of Technology | |
* Copyright (c) 2000 Matteo Frigo |
OlderNewer