Skip to content

Instantly share code, notes, and snippets.

View emonidi's full-sized avatar

Emilian Gospodinov emonidi

  • Deutsche Telekom
  • Frankfurt am Main, Germany
View GitHub Profile
@emonidi
emonidi / Symple Strings
Created May 10, 2015 08:13
Good JS Interview Task
/*
Have the function SimpleSymbols(str) take the str parameter being passed and determine if
it is an acceptable sequence by either returning the string true or false. The str parameter
will be composed of + and = symbols with several letters between them (ie. ++d+===+c++==a)
and for the string to be true each letter must be surrounded by a + symbol. So the string to the
left would be false. The string will not be empty and will have at least one letter.
*/
var correctString = '+d+=3=+s+';
var incorrectString = '+d=+3=2+'
@emonidi
emonidi / index.html
Created August 29, 2016 15:48
mENQaZ
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
</head>
<body>
<div>
<div class='widget_wrapper bike'>
<div class='head'>
<strong>Your Bike Savings</strong>
@emonidi
emonidi / tot.ts
Created May 24, 2023 16:17
Langchain.js Naive ToT implementation
import { models } from '../models'
import { LLMChain, SerializedLLMChain } from "langchain/chains";
import { PromptTemplate } from "langchain/prompts";
import {AgentExecutor, BaseSingleActionAgent, StoppingMethod } from "langchain/agents";
import { CallbackManagerForChainRun, Callbacks } from "langchain/callbacks";
import { BaseMultiActionAgent } from "langchain/dist/agents/agent";
import { BaseMemory } from "langchain/memory";
import { AgentAction, AgentFinish, ChainValues } from "langchain/schema";
import { Tool } from "langchain/tools";