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 OpenAI from "openai"; | |
import { type CompletionCreateParams } from "openai/resources/chat"; | |
import stringify from "json-stringify-pretty-compact"; | |
import type { FromSchema, JSONSchema } from "json-schema-to-ts"; | |
import Ajv from "ajv"; | |
const ajv = new Ajv({ strict: false }); | |
export const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY }); |
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
# Counts the total number of insertions and deletions in a git repository's lifetime | |
require 'git' | |
repo = Git.open('../emberall') | |
prev = repo.log.first | |
deletions = 0 | |
insertions = 0 | |
repo.log(count = 5000).each do |commit| |
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.your.app; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.view.KeyEvent; | |
import com.facebook.react.LifecycleState; | |
import com.facebook.react.ReactInstanceManager; | |
import com.facebook.react.ReactRootView; | |
import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; |