This Week plan
- What I Am planing to do this week
- Complete Big Task 1123
- Big Task 2123
What Happened Last Week
- Last week plan
- Big Task 1
- Big Task 1123
import requests | |
def lookup_podcasts(search_term): | |
base_url = "https://itunes.apple.com/search" | |
params = { | |
"term": search_term, | |
"media": "podcast", | |
"limit": 10 # Adjust the limit as needed | |
} | |
This Week plan
What Happened Last Week
import SwiftUI | |
extension Color { | |
static var random: Color { | |
return Color( | |
red: .random(in: 0...1), | |
green: .random(in: 0...1), | |
blue: .random(in: 0...1) | |
) | |
} |
javascript:(function()%7Bvar%20video%20%3D%20document.getElementsByTagName('video')%5B0%5D%3Bvideo.play()%3Bvideo.webkitSetPresentationMode(video.webkitPresentationMode%20%3D%3D%3D%20%22picture-in-picture%22%20%3F%20%22inline%22%20%3A%20%22picture-in-picture%22)%7D)() |
from PIL import Image, ImageDraw | |
import random | |
from sys import argv | |
image_name = "" | |
if len(argv) != 4: | |
print("My have input, output and factor") | |
exit() | |
else: |
import os | |
from sys import argv | |
from Quartz import CGWindowListCopyWindowInfo, kCGWindowListExcludeDesktopElements, kCGNullWindowID,kCGWindowListOptionOnScreenOnly | |
windowList = CGWindowListCopyWindowInfo(kCGWindowListOptionOnScreenOnly | kCGWindowListExcludeDesktopElements, kCGNullWindowID) | |
systemWindows = ['SystemUIServer', 'Window Server', 'Spotlight'] | |
searchname = argv[1].lower() | |
for i in windowList: | |
if searchname in i['kCGWindowOwnerName'].lower() and i['kCGWindowOwnerName'] not in systemWindows: | |
print(i['kCGWindowNumber'], i['kCGWindowOwnerName']) | |
os.system('screencapture -l{0} "tmp/{0}{1}.png"'.format(i['kCGWindowNumber'], i['kCGWindowOwnerName'])) |
from PIL import Image, ImageDraw | |
import sys | |
def rgb_2_pixels(fr, fg, fb, br, bg, bb, text='\u2584'): | |
fgc = "{0};{1};{2}".format(fr, fg, fb) | |
bgc = "{0};{1};{2}".format(br, bg, bb) | |
return "\033[38;2;{0};48;2;{1}m{2}\033[0m".format(fgc, bgc, text) | |
def morph_color(c1, c2): | |
return int((c1 + c2) / 2) |
extension UIView { | |
/// Example: call someView.nudge(0, 30) | |
func nudge(_ dx: CGFloat, _ dy: CGFloat) { | |
self.frame = self.frame.offsetBy(dx: dx, dy: dy) | |
CATransaction.flush() | |
} | |
} | |
extension UIView { | |
/// Example: po UIView.root |
# http://mathworld.wolfram.com/HeartCurve.html | |
from math import pi, sin, cos | |
import time | |
import numpy as np | |
r = 1 | |
result = [] | |
for i in range(38): | |
result.append([]) | |
result[i] = list(map(lambda x: ' ', range(38))) |
from PIL import Image, ImageDraw | |
import random | |
from sys import argv | |
if len(argv) != 3: | |
print("<<script>> Image outputDir") | |
exit(1) | |
image_name = argv[1] | |
out = argv[2] |