Skip to content

Instantly share code, notes, and snippets.

View ivansglazunov's full-sized avatar
🪄

Ivan S Glazunov ivansglazunov

🪄
View GitHub Profile
async ({ data: { newLink: replyLink, triggeredByLinkId }, deep, require }) => {
console.log({triggeredByLinkId})
const startTime = Date.now();
const PACKAGE_NAME = `@deep-foundation/chatgpt-azure`;
const axios = require('axios');
const { Configuration, OpenAIApi } = require('openai');
const chatGPTTypeLinkId = await deep.id(PACKAGE_NAME, 'ChatGPT');
const conversationTypeLinkId = await deep.id(PACKAGE_NAME, 'Conversation');
const apiKeyTypeLinkId = await deep.id('@deep-foundation/openai', 'ApiKey');
@ivansglazunov
ivansglazunov / deep.json
Last active November 29, 2022 19:24
@deep-foundation/deepcase
{"package":{"name":"@deep-foundation/deepcase","version":"0.0.0"},"data":[{"package":{"dependencyId":0,"containValue":"SyncTextFile"},"id":1},{"package":{"dependencyId":0,"containValue":"Handler"},"id":2},{"package":{"dependencyId":0,"containValue":"clientSupportsJs"},"id":3},{"package":{"dependencyId":0,"containValue":"HandleClient"},"id":4},{"package":{"dependencyId":1,"containValue":"TSX"},"id":5},{"package":{"dependencyId":0,"containValue":"GeneratedFrom"},"id":6},{"package":{"dependencyId":0,"containValue":"Type"},"id":7},{"package":{"dependencyId":0,"containValue":"Any"},"id":8},{"package":{"dependencyId":0,"containValue":"Query"},"id":9},{"package":{"dependencyId":0,"containValue":"Symbol"},"id":10},{"package":{"dependencyId":0,"containValue":"Join"},"id":11},{"package":{"dependencyId":0,"containValue":"Package"},"id":12},{"package":{"dependencyId":0,"containValue":"PackageQuery"},"id":13},{"package":{"dependencyId":0,"containValue":"Contain"},"id":14},{"id":"stringClientHandlerGenerated","type":1,"val
@ivansglazunov
ivansglazunov / deep.json
Created August 23, 2022 17:57
@deep-foundation/messanger
{}
@ivansglazunov
ivansglazunov / deep.json
Last active September 28, 2022 13:30
@deep-foundation/tsx
{"package":{"name":"@deep-foundation/tsx","version":"0.0.2"},"data":[{"package":{"dependencyId":0,"containValue":"Symbol"},"id":1},{"package":{"dependencyId":0,"containValue":"Type"},"id":2},{"package":{"dependencyId":0,"containValue":"SyncTextFile"},"id":3},{"package":{"dependencyId":0,"containValue":"Handler"},"id":4},{"package":{"dependencyId":0,"containValue":"dockerSupportsJs"},"id":5},{"package":{"dependencyId":0,"containValue":"HandleUpdate"},"id":6},{"package":{"dependencyId":0,"containValue":"HandleInsert"},"id":7},{"package":{"dependencyId":0,"containValue":"Value"},"id":8},{"package":{"dependencyId":0,"containValue":"String"},"id":9},{"id":"tsxSymbol","type":1,"from":"TSX","to":"TSX","value":{"value":"📑"}},{"id":"TSX","type":2,"value":{"value":"TSX"}},{"id":"compiler","type":3,"value":{"value":"\nasync ({ deep, require, gql, data: { newLink } }) => {\n const ts = require('typescript');\n const { data: [generatedFrom] } = await deep.select({\n type_id: await deep.id('@deep-foundation/core', 'Ge
@ivansglazunov
ivansglazunov / deep.json
Last active August 14, 2022 12:53
@deep-foundation/test deep-package
{"package":{"name":"@deep-foundation/test","version":"0.0.0"},"data":[{"package":{"dependencyId":0,"containValue":"Type"},"id":1},{"package":{"dependencyId":0,"containValue":"Any"},"id":2},{"package":{"dependencyId":0,"containValue":"SyncTextFile"},"id":3},{"id":"item","type":1,"from":2,"to":3}],"errors":[],"dependencies":[{"name":"@deep-foundation/core"}]}
@ivansglazunov
ivansglazunov / readme.md
Last active November 27, 2021 14:55
Deep Documentation

Checkboxes - documentation sections.

Link

  • Link as links table row.
  • Link as gql relational schema.
  • Link as minilinks structure.

Typing and inheritance.

  • Link by relation type returns type link of current link. Current link is instance of type link.
  • Type link behaves like a typing rule. Instance links must has from/to equal by type to type from/to.
@ivansglazunov
ivansglazunov / hpmor
Last active January 18, 2021 23:54
hpmor
This file has been truncated, but you can view the full file.
{"articles":[{"title":"Авторское предисловие к печатному русскому изданию","link":"https://hpmor.ru/book/1/foreword/","content":["Ещё в процессе написания «Гарри Поттер и методы рационального мышления» занимали первые места по популярности в мире среди всех фанфиков по Гарри Поттеру (место варьировалось между первым и третьим в зависимости от метода подсчёта - по числу отзывов или числу подписчиков). С тех пор, впрочем, у них появились и другие конкуренты. Эта история обрела поклонников во многих университетах мира, а 14 марта 2015 года, в день выхода последней, 122 главы, читатели организовали десятки вечеринок в честь этого события. Можно даже сказать, что этот фанфик породил собственный небольшой жанр, именуемый «рационалистское творчество». И сейчас у вас в руках печатное издание русского перевода — творение, в создание которого вложили свою любовь множество людей: [здесь надо указать имена переводчиков, оформителей, верстальщиков].","Рассказанная мной история происходит во вселенной Гарри Поттера, создан
@ivansglazunov
ivansglazunov / *.md
Last active June 7, 2020 21:16
calc file lines

projects src + node_modules

Language                             files          blank        comment           code
---------------------------------------------------------------------------------------
JavaScript                           48825        1364161        1325575        5816742
JSON                                 27058            353              0        2881973
Markdown                              3932         177131              4         464152
HTML                                   523          50792            201         426760
TypeScript                            7974          52380         232307         337009
SVG                                   2334             20             42          46097
@ivansglazunov
ivansglazunov / .md
Last active April 14, 2021 23:46
Не проходит тестовый charge в тестовом мобильном терминале

Сообщение технической поддержке Тинькофф:

Здравствуйте. Тестируем сейчас API оплаты рекуррентных платежей, и при тестировании функции Charge в ответ приходит ошибка с кодом 4:

{
  "Success":false,
  "ErrorCode":"4",
  "Message":"Запрашиваемое состояние транзакции является неверным.",
  "Details":"Изменение статуса недопустимо."
}