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
// debugging element to see data | |
const filesEl = document.createElement("pre"); | |
filesEl.textContent = "waiting for files..."; | |
filesEl.setAttribute("style", "z-index: 9999;background-color: #fff;") | |
document.body.prepend(filesEl); | |
const popup = window.open("https://fileserver.com/shared/handshake-files", 'popupWindowName', 'width=200,height=200'); | |
setTimeout(() => { | |
console.log("fileserver is ready, sending request for files"); |
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
const { exec } = require("child_process"); | |
const { statSync, existsSync, readFileSync } = require("fs"); | |
const path = require("path"); | |
const { sync: glob } = require("glob"); | |
const DEPENDENCY = "axios"; | |
const reinstall = (pth) => { | |
return new Promise((resolve, reject) => { | |
const packageJsonPath = path.join(pth, "package.json"); |
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
const TOKEN = ""; | |
const PLAUSIBLE_URL = "https://plausible.acme.com"; | |
const SITES = [ | |
{ | |
col: "C", | |
siteId: "acme.com" | |
}, | |
{ | |
col: "D", | |
siteId: "softwarebyacme.com" |
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
(() => { | |
const OPENAI_TOKEN = ""; | |
const MODEL = "gpt-4-1106-preview"; | |
//const MODEL = "gpt-3.5-turbo" | |
const ADDITIONAL_QUERY = "These questions are asked within the context of the Czech Republic and it's law."; | |
const QUERY_TASK = `Task: Identify the correct option (or options in case of a multiple-answer question) that best answers the provided question and provide your answer in the format: {"letters": ["Letter(s) to the correct options"], "explanation": "[Few words explaining why the choice is correct]", "certainty": "[How certain, in %, are you that the answer is correct]"}. ${ADDITIONAL_QUERY}`.trimEnd(); |
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
// const fetch = require("node-fetch") | |
let createPlaceholderAnswer = (letter, description) => ({ | |
value: `${letter}. ${description}`, | |
letter, | |
select: () => { | |
console.log("debug: called select() in answer", letter); | |
}, | |
}); |
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
const map = new Map(); | |
const directory = document.querySelector(".directory"); | |
const container = document.createElement("div"); | |
let currentIndex = -1; | |
const getNext = () => { currentIndex++; return map.get(currentIndex)?.href ?? null; } | |
directory.prepend(container); |
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 { PrismaModule } from "@infra/prisma/PrismaModule"; | |
import { Module } from "@nestjs/common"; | |
import { UserRepository } from "./UserRepository"; | |
import { PrismaRepository } from "@infra/prisma/PrismaRepository"; | |
@Module({ | |
imports: [ | |
PrismaModule.forRoot( | |
UserRepository, | |
"user", // base repository, can be injected with @InjectRepository("user") |
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
const axios = require("axios"); | |
const { createWriteStream, existsSync, mkdirSync } = require("fs"); | |
const path = require("path"); | |
const client = axios.create({ | |
baseURL: 'https://api.apparyllis.com:8443', | |
headers: { | |
Accept: 'application/json', | |
Authorization: '<TOKEN HERE>', | |
}, |
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 declare(strict_types=1); | |
require __DIR__ . "/vendor/autoload.php"; | |
const BaseOldNamespace = "Ublaboo\\DataGrid"; | |
const BaseNewNamespace = "Contributte\\Datagrid"; | |
const Replace = true; | |
const Test = false; |