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
export async function sendSkeet({ text, agent, attatchments }: { | |
text: string, | |
agent: bsky.BskyAgent, | |
attatchments?: Attatchments, | |
}) { | |
const rt = new RichText({ text }); | |
await rt.detectFacets(agent); | |
const post: any = { | |
$type: 'app.bsky.feed.post', |
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 bsky from '@atproto/api'; | |
const { BskyAgent, RichText } = bsky; | |
import * as dotenv from 'dotenv'; | |
import process from 'node:process'; | |
dotenv.config(); | |
const agent = new BskyAgent({ | |
service: 'https://bsky.social', | |
}); |
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 { BskyAgent, AtpSessionEvent, AtpSessionData } from '@atproto/api' | |
//https://github.com/bluesky-social/atproto/tree/main/packages/api | |
const bsAgent = async () => { | |
const agent = new BskyAgent({ | |
service: 'https://bsky.app/', | |
persistSession: (evt: AtpSessionEvent, sess?: AtpSessionData) => { | |
// store the session-data for reuse | |
} |
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
<?php | |
add_filter('get_default_comment_status', [ | |
IM_M_Comments::class, 'get_default_comment_status' | |
], 100, 3 ); | |
apply_filters( 'comments_open', [ | |
IM_M_Comments::class, 'comments_open' | |
], 100, 2 ); | |
class IM_M_Comments { |
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 pytube as pt | |
import whisper | |
# download mp3 from youtube video (Two Minute Papers) | |
yt = pt.YouTube("https://www.youtube.com/watch?v=dd1kN_myNDs") | |
stream = yt.streams.filter(only_audio=True)[0] | |
stream.download(filename="audio_english.mp3") | |
# load large wisper model | |
model = whisper.load_model("large") | |
# transcribe |
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
from openai import Model, Engine | |
from gpt_index.composability import ComposableGraph | |
from gpt_index.readers import GithubRepositoryReader | |
from gpt_index import download_loader,GPTTreeIndex,Document,MockLLMPredictor,GPTListIndex,PromptHelper,GPTSimpleVectorIndex, LLMPredictor, SimpleDirectoryReader | |
from dotenv import load_dotenv | |
from pathlib import Path | |
from prepare import unmark | |
load_dotenv() | |
import os |
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
//https://raw.githubusercontent.com/imaginarymachines/ufo-ai-wp/75803f4a44158a51f9f77b740ae4065417492d0e/src/api/checkConnection.js | |
import React from 'react'; | |
import apiFetch from '@wordpress/api-fetch'; | |
const checkConnection = async () => { | |
const is = await apiFetch( { | |
path: '/ufo-ai/v1/connected', | |
method: 'GET', | |
} ) | |
.then( ( res ) => { | |
if ( res ) { |
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
@if (Route::has('login')) | |
<div class="hidden fixed top-0 right-0 px-6 py-4 sm:block"> | |
@auth | |
<a href="{{ url('/dashboard') }}" class="text-sm text-gray-700 dark:text-gray-500 underline">Dashboard</a> | |
@else | |
<a href="{{ route('login') }}" class="text-sm text-gray-700 dark:text-gray-500 underline">Log in</a> | |
@if (Route::has('register')) | |
<a href="{{ route('register') }}" class="ml-4 text-sm text-gray-700 dark:text-gray-500 underline">Register</a> | |
@endif |
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
$.post( url_of_wp_endpoint, {email: '[email protected]' } ); |
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
laravel.test: | |
build: | |
context: ./vendor/laravel/sail/runtimes/8.1 | |
dockerfile: Dockerfile | |
args: | |
WWWGROUP: '${WWWGROUP}' | |
image: sail-8.1/app | |
extra_hosts: | |
- 'host.docker.internal:host-gateway' | |
ports: |