Skip to content

Instantly share code, notes, and snippets.

View Konard's full-sized avatar
🖥️
Watch how I code at https://www.youtube.com/c/КонстантинДьяченко

Konstantin Dyachenko Konard

🖥️
Watch how I code at https://www.youtube.com/c/КонстантинДьяченко
View GitHub Profile
async ({ deep, require }) => {
const React = require('react');
const { Box, Img, Text, useColorMode } = require('@chakra-ui/react');
const { useDebounceCallback } = require('@react-hook/debounce');
const { AnimatePresence, useAnimation, motion, useInView, useMotionValue, useSpring, useTransform, useIsPresent } = require('framer-motion');
const { useEffect, useRef, useState } = require('react');
const { ClientHandler } = require('@deep-foundation/deepcase');
const transition = {
type: "spring", mass: 0.5, bounce: 0.25, stiffness: 200, damping: 100
};
async ({ deep, require }) => {
const React = require('react');
const { Box, Img, Text, useColorMode } = require('@chakra-ui/react');
const { useDebounceCallback } = require('@react-hook/debounce');
const { AnimatePresence, useAnimation, motion, useInView, useMotionValue, useSpring, useTransform, useIsPresent } = require('framer-motion');
const { useEffect, useRef, useState } = require('react');
const transition = {
type: "spring", mass: 0.5, bounce: 0.25, stiffness: 200, damping: 100
};
async ({ deep, require }) => {
const { extendTheme, ChakraProvider } = require('@chakra-ui/react');
const { mode } = await deep.import('@chakra-ui/theme-tools');
const config = {
initialColorMode: 'light',
useSystemColorMode: false,
cssVarPrefix: 'deepCase',
}
@Konard
Konard / main.py
Created September 26, 2023 16:02 — forked from kalinochkind/main.py
Discord gpt bot
#!/usr/bin/env python3
import discord
import sqlite3
import datetime
import openai
import os
import tiktoken
openai.api_type = "azure"
[\S\s]+ — Today at \d+:\d+ PM
\[\d+:\d+ PM\]
@[\S\s]+

Для аутентификации в VK API с помощью Python и библиотеки requests вам понадобится получить access token.

Вам следует знать, что получение access token зависит от типа вашего приложения. В общем случае, вы можете получить его через OAuth 2.0. Процесс включает в себя следующие шаги:

  1. Зарегистрируйте новое приложение на сайте VK: https://vk.com/editapp?act=create

  2. Получите client_id вашего приложения в настройках.

  3. Создайте URL для авторизации, используя client_id, перечислив необходимые scope (права доступа) и указав redirect_uri (обычно это "https://oauth.vk.com/blank.html" для standalone-приложений).

    Пример URL:

public interface IProcessor<in T>
{
void Process(T input);
}
public class StringProcessor : IProcessor<string>
{
public void Process(string input)
{
Console.WriteLine($"Processing string: {input}");
// Определяем переменные
let num1 = prompt("Введите первое число:");
let operator = prompt("Введите оператор ( +, -, *, / ):");
let num2 = prompt("Введите второе число:");
// Переводим введенные значения в числа
num1 = Number(num1);
num2 = Number(num2);
// Определяем функции для каждого из возможных операторов
@Konard
Konard / client-handler-deep-subscription-error.md
Created May 5, 2023 04:43
I need to sort by depth that is available only in tree view. useDeepSubscription returns empty array in that case.

image

async ({ deep, require }) => {
  const React = require('react');
  const { Text, Box } = require('@chakra-ui/react');

  const messagingTreeId = await deep.id("@deep-foundation/messaging", "MessagingTree");
  const messageTypeLinkId = await deep.id("@deep-foundation/messaging", "Message");
 const authorTypeLinkId = await deep.id("@deep-foundation/messaging", "Author");

Model: GPT-4


What are top ten goals for AI with highest priority?


The top ten goals for AI with the highest priority can vary depending on who you ask, but some common goals within the AI research community include:

  1. Ensuring AI safety and robustness: Developing AI systems that are safe, secure, and reliable, minimizing the risks associated with unintended consequences and malicious uses.