This file contains 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
javascript:(() => { const u = document.querySelector('video[src*=".cdninstagram.com"]').src; const a = document.createElement('a'); a.setAttribute('href', 'CLICK'); a.setAttribute('download', u); a.style.display = 'none'; document.body.append(a, 'end'); a.click(); a.remove(); })(); |
This file contains 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
MODEL_ID="gemini-1.0-pro-001" | |
LOCATION="asia-northeast1" | |
API_ENDPOINT="$LOCATION-aiplatform.googleapis.com" | |
PROJECT_ID=$PROJECT_ID | |
curl -X POST \ | |
-H "Authorization: Bearer $(gcloud auth print-access-token)" \ | |
-H "Content-Type: application/json" \ | |
https://${API_ENDPOINT}/v1/projects/${PROJECT_ID}/locations/${LOCATION}/publishers/google/models/${MODEL_ID}:streamGenerateContent \ | |
-d '{ |
This file contains 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
{ | |
"model": "gpt-3.5-turbo-0613", | |
"messages": [ | |
{ | |
"role": "user", | |
"content": "1. give a good 'tip' in 10-15 words.\n2. generate a name for a science fiction universe" | |
} | |
], | |
"functions": [ | |
{ |
This file contains 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 { Document } from 'langchain/document'; | |
import { OpenAIChat } from 'langchain/llms/openai'; | |
import { OpenAIEmbeddings } from 'langchain/embeddings/openai'; | |
import { RecursiveCharacterTextSplitter } from 'langchain/text_splitter'; | |
import { MemoryVectorStore } from 'langchain/vectorstores/memory'; | |
import { VectorDBQAChain } from 'langchain/chains'; | |
export async function main(apiKey: string) { | |
const text = `some text`; | |
const splitter = new RecursiveCharacterTextSplitter({ |
This file contains 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
type SpeechRecognitionListener = (e: SpeechRecognitionEvent) => void; | |
export function createSpeechRecognition( | |
onResult: SpeechRecognitionListener, | |
): SpeechRecognition | undefined { | |
if (typeof window !== 'object') return; | |
const SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition; | |
if (typeof SpeechRecognition !== 'undefined') { |
This file contains 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
const express = require("express"); | |
const next = require("next"); | |
const compression = require("compression"); | |
const helmet = require("helmet"); | |
const morgan = require("morgan"); | |
const { logger } = require('./logger'); | |
async function startSever() { | |
const dev = process.env.NODE_ENV === 'development'; | |
const app = next({ dev }); |
This file contains 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
const webfontsGenerator = require('webfonts-generator'); | |
webfontsGenerator({ | |
fontName: 'demo', | |
html: false, | |
css: false, | |
files: [ | |
'A.svg', | |
'B.svg', | |
], |
This file contains 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
/** | |
* @typedef {Object} MSDocument | |
* @property {(message: string) => void} showMessage | |
*/ | |
/** | |
* @typedef {Object} Context | |
* @property {MSDocument} document | |
*/ |
This file contains 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
/* | |
PadZero returns "043737" when get 43737 | |
https://www.aozora.gr.jp/cards/000081/card43737.html | |
*/ | |
func PadZero(cardID int) string { | |
return fmt.Sprintf("%06d", cardID) | |
} |
This file contains 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
<h1 id="header"></h1> |
NewerOlder