This file contains 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
# example: python "D:\Users\rahul\Documents\Python Scripts\image rename\imageRename.py" "D:\Users\rahul\Documents\Python Scripts\image rename\test_images" "blah" | |
# imageX.jpg --> imageX_blah.jpg | |
import os | |
import argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument("dir") | |
parser.add_argument("suffix") | |
args = parser.parse_args() |
This file contains 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
# example: python "D:\Users\rahul\Documents\Python Scripts\photoframeFiller.py" "D:\image_source" "E:\" | |
# copy from folders (albums) in image_source to sdcard E for photo frame | |
import os | |
import argparse | |
import random | |
import shutil | |
parser = argparse.ArgumentParser() | |
parser.add_argument("fromDir") |
This file contains 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
127.0.0.1 doubleclick.net | |
127.0.0.1 adclick.g.doubleclick.net | |
127.0.0.1 googletagservices.com | |
127.0.0.1 appspot.com | |
127.0.0.1 securepubads.g.doubleclick.net | |
127.0.0.1 googleads.g.doubleclick.net | |
127.0.0.1 adservice.google.com | |
127.0.0.1 googlesyndication.com | |
127.0.0.1 tpc.googlesyndication.com |
This file contains 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
.Root__main-view > div:first-of-type { | |
display: none; | |
} |
This file contains 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
@echo off | |
setlocal EnableDelayedExpansion | |
set colour1=[38;2;128;32;192m | |
set colour2=[38;5;208m | |
echo %colour1%---%colour2% ESC[XXm %colour1%---[0m | |
@REM dark background | |
set str= | |
for /l %%c in (30,1,37) do ( |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
# https://www.python.org/dev/peps/pep-0008/#naming-conventions | |
# short lowercase module and package names | |
# underscores if needed, but discouraged for packages | |
# package.my_module ie package\my_module.py | |
from typing import TypeVar | |
# CapWords for Type Variable names, and preferably short | |
VT_co = TypeVar("VT_co", covariant=True) |
This file contains 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 os | |
import subprocess | |
from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip | |
clip_times = { | |
"clip1.mp4": [ | |
((2, 12), (2, 20)), | |
((2, 25), (2, 35)), | |
], |
This file contains 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
# Add suffix in place | |
Get-ChildItem -Recurse | Where-Object { !$_.PSIsContainer } | ForEach-Object { | |
Rename-Item $_.FullName -NewName "$($_.BaseName)-$($_.Directory.Name)$($_.Extension)" | |
} | |
# Move to parent with suffix | |
Get-ChildItem -Recurse | Where-Object { !$_.PSIsContainer } | ForEach-Object { | |
Move-Item $_.FullName -Destination "$($_.Directory.Parent.FullName)\$($_.BaseName)-$($_.Directory.Name)$($_.Extension)" | |
} |
OlderNewer