This file contains hidden or 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 tiktoken | |
import sys | |
import os | |
def count_tokens(file_path): | |
try: | |
# Проверяем, существует ли файл | |
if not os.path.exists(file_path): | |
print(f"Ошибка: Файл '{file_path}' не найден.") | |
return |
This file contains hidden or 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 '[java.math MathContext RoundingMode]) | |
(comment | |
(apply + (last | |
(transpose | |
(map (fn [i] | |
(concat (repeat i 0) | |
(map (partial * 1.75) (range 1 (- 12 i))))) | |
(range 11))))) | |
) |
This file contains hidden or 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
[color] | |
ui = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green | |
[color "diff"] | |
meta = yellow bold | |
frag = magenta bold | |
old = red bold |
This file contains hidden or 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
# .zshrc | |
#autoload -Uz compinit && compinit | |
autoload -U select-word-style | |
select-word-style bash | |
setopt extended_history | |
setopt hist_expire_dups_first | |
setopt hist_ignore_dups | |
setopt hist_ignore_all_dups |
This file contains hidden or 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
export PATH=$HOME/bin:$PATH:/usr/local/sbin | |
export PATH=$PATH:$HOME/appengine-java-sdk/bin | |
export LC_ALL=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
export HISTFILESIZE=5000000 | |
#export HISTCONTROL=ignoredups | |
export HISTCONTROL=ignoreboth:erasedups |
This file contains hidden or 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
private Map<String, Map<String, Map<SchemaInternalOperation, List<SchemaCharge>>>> splitTotal(List<SchemaCharge> charges) { | |
return MapSeq.map(splitByOffer(charges), (String k, List<SchemaCharge> v) -> { | |
return MapSeq.map(splitByResource(v), w -> splitByOperation(w)); | |
}); | |
} | |
private Map<String, List<SchemaCharge>> splitByOffer(List<SchemaCharge> charges) { | |
return MapSeq.orderedGroupBy(charges, SchemaCharge::getOfferId); | |
} |
This file contains hidden or 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
package com.odin.rating.application.utils; | |
import com.odin.rating.application.api.PersistenceHandler; | |
import reactor.core.publisher.Mono; | |
import javax.persistence.EntityTransaction; | |
import java.util.function.Function; | |
public class TransactionalMono<T> { | |
private final EntityTransaction transaction; |
This file contains hidden or 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
package ...; | |
import reactor.core.publisher.Flux; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.function.BiFunction; | |
import java.util.function.Function; | |
import java.util.function.Predicate; | |
import java.util.stream.Collectors; |
This file contains hidden or 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
(ns ideal.tools.graph) | |
(defn add-edge | |
[graph v w] | |
(update graph v (fnil conj #{}) w)) | |
(defn all-children | |
[graph key] | |
(if-let [first-children (get graph key)] | |
(into #{} |
This file contains hidden or 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
syntax on | |
set autoindent | |
set cindent | |
set ruler | |
if has("autocmd") | |
filetype plugin indent on | |
autocmd FileType make set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab | |
endif | |
set tabstop=4 |
NewerOlder