A cross-platform PowerShell script that intelligently detects moved/renamed files in Git repositories and preserves their history using git-filter-repo.
- PowerShell Core (Windows/Linux/macOS)
- Git
- git-filter-repo (
pip install git-filter-repo
)
A cross-platform PowerShell script that intelligently detects moved/renamed files in Git repositories and preserves their history using git-filter-repo.
pip install git-filter-repo
)@echo off | |
setlocal enabledelayedexpansion | |
if "%1"=="" ( | |
echo Usage: git_move_files.bat [RepositoryPath] | |
exit /b 1 | |
) | |
set "repo_path=%1" | |
cd /d "%repo_path%" || ( |
@echo off | |
setlocal enabledelayedexpansion | |
:: Check if the SVN directory path is provided | |
if "%1"=="" ( | |
echo Please provide the path to the SVN repository. | |
echo Usage: %~nx0 path\to\svn\repository | |
exit /b 1 | |
) | |
:: Initialize variables | |
set repo_path=%1 |
@echo off | |
setlocal enabledelayedexpansion | |
:: touch.bat - Windows implementation of Unix touch command | |
:: Usage: touch filename [filename2 filename3 ...] | |
:: Creates empty files if they don't exist or updates their timestamps if they do | |
:: Supports full paths and can create directories if needed | |
if "%~1"=="" ( | |
echo Usage: touch filepath [filepath2 filepath3 ...] |
param ( | |
[string]$playlistID | |
) | |
if (-not $playlistID) { | |
Write-Host "Please provide a playlist ID as a command-line argument." | |
exit 1 | |
} | |
# Define the playlist URL and output file |
from pylatexenc.latex2text import LatexNodes2Text | |
from nltk.probability import FreqDist | |
from nltk.corpus import stopwords | |
import argparse | |
import nltk | |
def analyze_word_frequency(filename, words_to_check): | |
"""Analyzes word frequency in a LaTeX document. |
import os | |
import sys | |
def is_binary(filename): | |
""" | |
Check if the file is binary. A file is considered binary if it contains a null byte | |
within the first 1024 bytes of its content. | |
you may run | |
FOR /F "tokens=*" %G IN ('python find_binary.py .') DO del "%G" |
config.ini |
import asyncio | |
from telethon.tl.types import ChannelParticipantsKicked | |
from telethon.sync import TelegramClient | |
from telethon.errors import FloodWaitError | |
# Replace these with your own Telegram API ID and Hash | |
api_id = 'YOUR_API_ID' | |
api_hash = 'YOUR_API_HASH' | |
# Replace with the positive integer ID of your group (omit the '-' sign) |