Skip to content

Instantly share code, notes, and snippets.

View ehzawad's full-sized avatar
🎃
Wasteland Baby!

ehzawad ehzawad

🎃
Wasteland Baby!
View GitHub Profile

/Users/ehza/github-repos/codex/codex-cli/src % codex ╭──────────────────────────────────────────────────────────────╮ │ ● OpenAI Codex (research preview) v0.1.2505161800 │ ╰──────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────╮ │ localhost session: 418d11041cca40b98b5a1af28f8ac734 │ │ ↳ workdir: ~/github-repos/codex/codex-cli/src │ │ ↳ model: codex-mini-latest │ │ ↳ provider: openai │

@ehzawad
ehzawad / php_to_node.md
Created April 28, 2025 06:22
php to node

Understood. I will dig into GitHub repositories specifically, focusing on open-source tools, frameworks, and agentic workflows that assist or enable migrating, refactoring, or transpiling full PHP codebases into Node.js (JavaScript/TypeScript). I will prioritize actively maintained projects, note their adaptability, and include any AST parser, LLM-driven agent frameworks, or hybrid systems that are directly relevant. I'll synthesize the findings into a detailed, no-nonsense report with practical guidance on applicability and readiness levels.

Open-Source Tools and Frameworks for PHP→Node.js Migration

Migrating a large PHP codebase to Node.js is a complex task. No turnkey solution exists, but several open-source projects and frameworks can help automate pieces of the process. We categorize these into AST parsers and analyzers, code transpilers and generators, LLM-assisted migration tools, and agentic framework kits. For each, we note capabilities, limitations, and adaptation effort, focu

#!/usr/bin/env python3
import asyncio
import aiohttp
import json
import time
import argparse
import os
import sys
import logging
from typing import Dict, Any, Optional, List, Text
#!/usr/bin/env python3
"""
Bengali Emotion Dataset Creator
This script creates a Hugging Face dataset from Bengali WAV files and their transcriptions.
It processes audio files, maps them with transcripts from a CSV file, and uploads
the dataset to the Hugging Face Hub.
Requirements:
- pandas
-- [email protected]; email me to say hi or if there are any questions
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
-- Install package manager
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
vim.fn.system {
'git', 'clone',
'--filter=blob:none',
#!/usr/bin/env python3
import socket
import requests
import concurrent.futures
import time
import sys
from urllib.parse import urlparse
from dataclasses import dataclass
from typing import List, Tuple
import subprocess
# SPDX-License-Identifier: Apache-2.0
import json
import random
import string
import torch
from vllm import LLM
from vllm.sampling_params import SamplingParams
import requests
import json
import random
def generate_otp() -> str:
"""Generate a random 6-digit OTP"""
return ''.join([str(random.randint(0, 9)) for _ in range(6)])
def test_otp_server():
# Generate a random 6-digit OTP
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define MAX_FUNCS 10 // Maximum number of functions supported
#define NAME_LEN 50 // Maximum length of function names
#define STR_LEN 100 // Maximum length of strings to print
// Structure to store function definitions
struct Function {