Skip to content

Instantly share code, notes, and snippets.

View abe-101's full-sized avatar
🎯
Focusing

Abe Hanoka abe-101

🎯
Focusing
View GitHub Profile
@abe-101
abe-101 / hebrew_date.py
Created May 14, 2023 02:28
This script generates a dictionary of Hebrew dates for the next three years and their corresponding Gregorian dates
from datetime import date, timedelta
from pyluach import dates
def create_hebrew_to_english_dict():
hebrew_to_english_dict = {}
first_gregorian_date = date.today() # two years ago
first_hebrew_date = dates.HebrewDate.from_pydate(first_gregorian_date)
for i in range(365 * 3): # three years
hebrew_date = dates.HebrewDate.from_pydate(first_gregorian_date + timedelta(days=i))
hebrew_date_str = f"{hebrew_date.month}-{hebrew_date.day}"
@abe-101
abe-101 / address_validator.py
Created April 17, 2023 00:58
The script validates and updates 'Participant's Shipping Address' in a TSV file using Google Cloud Address Validation API, for rows with 'USA' as the country.
import csv
import requests
api_key = 'API KEY'
def validate_address(address, api_key):
"""
Validates an address using the Google Cloud Address Validation API and returns the postal address fields.
Args:
address (str): The address to be validated.
from playwright.sync_api import Playwright, sync_playwright, expect
from ffmpeg import FFmpeg
# Function to run the audio enhancement process using Adobe Podcast
def run(playwright: Playwright, FILE) -> None:
# Launch the chromium browser
browser = playwright.chromium.launch()
# Create a new context with saved authentication information
@abe-101
abe-101 / youtube_to_captivate.py
Last active March 12, 2024 00:14
convert youtube video to captivate.fm podcast
#!/usr/bin/python
import os
from datetime import datetime, time
from typing import Dict, Union
import requests
from dotenv import load_dotenv
from yt_dlp import YoutubeDL
#!/bin/bash
tmux new -s work -d
tmux rename-window -t work vim
tmux send-keys -t work 'cd repos/django/calmerge/calmerge && workon calmerge' C-m
tmux new-window -t work
tmux rename-window -t work server
tmux send-keys -t work 'cd repos/django/calmerge && workon calmerge && python manage.py runserver' C-m
tmux split-window -h -t work