- Python Version Check
python -V
Python 3.12.1
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 SwiftUI | |
import AVFoundation | |
struct ContentView: View { | |
@State private var isRecording = false | |
@State private var transcription = "" | |
@State private var recordedAudioURL: URL? | |
@State private var responseAudioURL: URL? | |
@State private var isConnected = false | |
@State private var accumulatedAudioData = Data() |
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 { type Queue, R2Bucket } from "@cloudflare/workers-types"; | |
import puppeteer from "@cloudflare/puppeteer"; | |
import { PDFDocument } from "pdf-lib"; | |
import { Buffer } from 'node:buffer'; | |
type Env = { | |
MY_BUCKET: R2Bucket; | |
MY_QUEUE: Queue; | |
MY_BROWSER: any; | |
MY_KV_NAMESPACE: KVNamespace |
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
const fs = require('fs'); | |
const https = require('https'); | |
const { execSync } = require('child_process'); | |
const model = 'gemini-1.5-pro-latest'; | |
function getGitTrackedFiles(basePath) { | |
const command = `git ls-files ${basePath}`; | |
try { | |
const stdout = execSync(command, { encoding: 'utf8' }); |
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
python | 競馬予想で始める機械学習〜完全版〜 | https://zenn.dev/dijzpeb/books/848d4d8e47001193f3fb | ¥3,900 | |
---|---|---|---|---|
python | 【図解】ネコでも分かるDeepLearningの基礎まとめ【初心者向け】 | https://zenn.dev/nekoallergy/books/904df952389317 | ¥1,000 | |
python | Python 中級者への道 | https://zenn.dev/gomecha/books/4fa32ac5f76af31b2f81 | ¥500 | |
python | 競馬予想で始める機械学習〜動画中のソースコード〜 | https://zenn.dev/dijzpeb/books/6bb4672104889fc17829 | ¥2,400 | |
python | DjangoとVue.jsでシンプルなTodoアプリを作る | https://zenn.dev/fujiikayo/books/fc501522bcff6e | ¥500 | |
python | 【図解】ネコでも分かるPythonの基礎まとめ【初心者向け】 | https://zenn.dev/nekoallergy/books/python-basic | ¥500 | |
python | 【無料】AWS EC2 + nginx + uWSGI + Flaskでwebアプリ開発 | https://zenn.dev/shota_imazeki/books/7a0f8e2f4cccd846fb16 | ¥200 | |
python | 誰でもかんたん! 自分の競馬予想AIを作ろう! | https://zenn.dev/umakaze/books/312ddc2bbf3601 | ¥2,000 | |
python | 競馬予想で始める機械学習〜最新のソースコード〜 | https://zenn.dev/dijzpeb/books/951e0f755229125bb79c | ¥2,400 | |
python | 週刊 JPEGデコーダをつくる | https://zenn.dev/yohhoy/books/make-jpeg-decoder | ¥300 |
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 { createServer } from 'net' | |
import { Hono } from 'hono' | |
// import { Hono } from './dist' | |
const PORT = 3000 | |
/** | |
* TODO: Remove globalThis.Response | |
* The Response object is normally supported by the runtime. | |
* This is a workaround for the issue where `new Response` is not |
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 os | |
from gql import gql, Client | |
from gql.transport.requests import RequestsHTTPTransport | |
token = os.getenv("GITHUB_TOKEN") | |
transport = RequestsHTTPTransport( | |
url="https://api.github.com/graphql", | |
use_json=True, | |
headers={"Authorization": f"bearer {token}"}, |
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 path from "node:path"; | |
import fs from "node:fs"; | |
import { spawn } from "node:child_process"; | |
/** | |
* $ node getCompletionsCycling.mjs ./sample.ts | |
*/ | |
const server = spawn("node", ["./copilot.vim/dist/agent.js"]); // https://github.com/github/copilot.vim |
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 sys | |
import openai | |
import json | |
def run_conversation(input): | |
content = f""" | |
ダジャレの面白さをAからEに評価して、評価の理由を論理的にコメントします。 | |
ダジャレ:{input} |
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 com.example.openaikotlintest | |
import com.aallam.openai.api.BetaOpenAI | |
import com.aallam.openai.api.chat.ChatCompletionRequest | |
import com.aallam.openai.api.chat.ChatMessage | |
import com.aallam.openai.api.chat.ChatRole | |
import com.aallam.openai.api.http.Timeout | |
import com.aallam.openai.api.model.ModelId | |
import com.aallam.openai.client.OpenAI | |
import com.aallam.openai.client.OpenAIConfig |