I hereby claim:
- I am ivanreznikov on github.
- I am ivanreznikov (https://keybase.io/ivanreznikov) on keybase.
- I have a public key ASBmauybB17mDJXQ37zE1GprifR1Z9aC5oSkrQJcpCABJQo
To claim this, I am signing this object:
Feature | LangChain | LLM | ChatGPT | |
---|---|---|---|---|
Type | Framework | Model | Model | |
Purpose | Build applications with LLMs | Generate text | Generate chat conversations | |
Key features | Chains prompts memory | Large dataset of text and code | Large dataset of chat conversations | |
Advantages | Can combine LLMs with other programming techniques | Generates human-quality text | Generates realistic chat conversations | |
Disadvantages | Requires some programming knowledge | Not as easy to use for specific tasks | Not as versatile as LangChain |
def pandas_nan(x): | |
import pandas as pd | |
return pd.isna(x) | |
def numpy_nan(x): | |
import numpy as np | |
return np.isnan(x) | |
def math_nan(x): | |
import math |
import ( | |
"sort" | |
) | |
//In this solution you'll see some uglyness. Mostly because I don't know go well, particularly how to create a nested recursion function. | |
//For this reason I have a global var here | |
var results [][]int | |
func NSum(N int, left_index int, right_index int, target int, result []int, nums []int) int{ | |
//cases, where calculations are not necessary |
import( | |
"sort" | |
"math" | |
) | |
func threeSumClosest(nums []int, target int) int { | |
sort.Ints(nums) | |
var current_min int | |
var current_dif float64 = -1.0 | |
for i, n := range nums { |
import ( | |
"math" | |
) | |
func threeSumClosest(nums []int, target int) int { | |
var current_min int | |
var current_dif float64 = -1.0 | |
for i, n := range nums { | |
for i2, n2 := range nums[i+1:] { | |
for _, n3 := range nums[i2+i+2:] { |
import ( | |
"sort" | |
) | |
func threeSum(nums []int) [][]int { | |
sort.Ints(nums) | |
var res [][]int | |
left_index := 0 | |
right_index := len(nums) - 1 | |
for i, n := range nums{ | |
//skipping value if i>0, meaning all int left are possitive and if previous one is the same |
import ( | |
"sort" | |
) | |
func threeSum(nums []int) [][]int { | |
var res [][]int | |
sum_map := make(map[string]int) | |
for i, n := range nums { | |
for i2, n2 := range nums[i+1:] { | |
for _, n3 := range nums[i2+i+2:] { |
func twoSum(nums []int, target int) []int { | |
dif_map := make(map[int]int) | |
for i, n := range nums{ | |
if i2, ok := dif_map[target - n]; ok { | |
return []int{i2, i} | |
} | |
dif_map[n] = i | |
} | |
return nil | |
} |
func twoSum(nums []int, target int) []int { | |
for i, n := range nums{ | |
for i2, n2 := range nums[i+1:]{ | |
if n+n2 == target{ | |
return []int{i, i2+i+1} | |
} | |
} | |
} | |
return nil | |
} |
I hereby claim:
To claim this, I am signing this object: