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 python3 | |
| """ | |
| mlc.py — Mayan Long Count date calculator. | |
| Returns the full Mayan calendar date for any Gregorian date: | |
| - Long Count (Bak'tun.K'atun.Tun.Winal.K'in) + raw day count | |
| - Tzolk'in (sacred 260-day cycle) | |
| - Haab' (365-day solar cycle) | |
| - Calendar Round (Tzolk'in + Haab' combined) | |
| - Lord of the Night (9-night cycle, G1–G9) |
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 python3 | |
| """ | |
| spiral-date — look up the Nine Day Sun position for any date. | |
| Usage: | |
| spiral-date # today | |
| spiral-date 2026-04-15 # specific date (Sun 5) | |
| spiral-date 2020-06-15 # specific date (Sun 4) | |
| spiral-date -3113-08-11 # Sun 4 anchor (astronomical year notation) | |
| spiral-date tomorrow # relative |
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
| # This is the same function, written two different ways in Python | |
| def oddEvenA(number:int) -> str: | |
| if number % 2 == 0: | |
| odd_even = "even" | |
| else | |
| odd_even = "odd" | |
| return odd_even |
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
| # file: bingo_card_generator.py | |
| # --------------------------------------------------------- | |
| # author: Adge Denkers | |
| # github: @adgedenkers | |
| # created: 2025-02-01 | |
| # updated: 2025-02-01 | |
| # version: 1.0.0 | |
| import numpy as np | |
| from openpyxl import Workbook |
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
| from openpyxl import load_workbook | |
| from openpyxl.styles import Font, PatternFill | |
| def modify_excel(input_path, output_path): | |
| # Load the workbook and select the relevant sheet | |
| workbook = load_workbook(input_path) | |
| sheet1 = workbook['Sheet1'] | |
| # Step 1: Freeze header row and columns A-F | |
| sheet1.freeze_panes = 'G2' |
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/bash | |
| # File: ~/src/setup_nginx_and_services.sh | |
| set -e # Exit immediately if a command exits with a non-zero status | |
| # Variables | |
| DOMAIN_DASHBOARD="dashboard.denkers.co" | |
| DOMAIN_API="api.denkers.co" | |
| NGINX_CONF="/etc/nginx/sites-available/denkers.co" | |
| SYSTEMD_DIR="/etc/systemd/system" |
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
| # ----------------------------------------------------------------------------- | |
| # List sports schedules | |
| # ----------------------------------------------------------------------------- | |
| async def fetch_schedule_data() -> List[Dict[str, Any]]: | |
| """ | |
| Asynchronously fetch and parse the sports schedule data. | |
| """ | |
| url = "https://www.schedulegalaxy.com/schools/159/teams/58255" | |
| params = { |
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
| # BBallSchedule.py | |
| # | |
| # Author: AdgeDenkers | |
| # created: 2024-10-28 | |
| # updated: 2024-11-13 | |
| # Version: 1.1 | |
| # Note: Get the current dates event if any | |
| import requests |
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
| { | |
| "manufacturer": "Samsung", | |
| "product_type": "Household Microwave Oven", | |
| "manufactured_in": "42000 Pelabuhan Klang, Selangor, W. Malaysia", | |
| "manufacture_date": "March 2022", | |
| "model_number": "ME19R7041FS", | |
| "serial_number": "OBQKTVTT301045Z", | |
| "power": { | |
| "voltage": "120 Vac", | |
| "frequency": "60 Hz", |
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 pandas as pd | |
| def compare_excel_sheets(file1, file2, sheet1, sheet2, columns_to_compare, unique_id_column): | |
| # Load the excel files | |
| df1 = pd.read_excel(file1, sheet_name=sheet1) | |
| df2 = pd.read_excel(file2, sheet_name=sheet2) | |
| # Merge the dataframes on 'Position Number' | |
| merged_df = pd.merge(df1, df2, on=unique_id_column, suffixes=('_file1', '_file2')) |
NewerOlder