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
| (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
| 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
| #!/bin/sh | |
| git fetch | |
| current=`git branch --show-current` | |
| git pull origin $current |
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
| #!/usr/bin/env bash | |
| set -e | |
| ROOT_DIR="${1:-.}" | |
| find "$ROOT_DIR" -type d -name ".git" | while read -r gitdir; do | |
| repo_dir="$(dirname "$gitdir")" | |
| echo "=== Updating $repo_dir ===" |
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 dates-normal-distribution | |
| (:import [java.util.concurrent ThreadLocalRandom] | |
| [java.time LocalDate])) | |
| (defn next-gaussian | |
| [] | |
| (let [k 0.166 | |
| r (.nextGaussian (ThreadLocalRandom/current)) | |
| x (+ 0.5 (* r k))] | |
| (if (<= 0 x 1) |
OlderNewer