Skip to content

Instantly share code, notes, and snippets.

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

ehzawad ehzawad

🎃
Wasteland Baby!
View GitHub Profile

Looking at your GeForce RTX 2050 laptop GPU, here's what I recommend:

Best Driver Options for RTX 2050 Laptop:

1. nvidia-driver-575-open (RECOMMENDED)

  • Version: 575.64.03
  • Why: Ubuntu specifically recommends this for your RTX 2050
  • Benefits for laptops: the driver also added NVIDIA Dynamic Boost support for Linux notebooks running on battery power
  • CUDA: Fully compatible with CUDA 12.9
#!/usr/bin/env python3
"""
Run GPT-OSS using the Metal implementation for Apple Silicon
This requires downloading and converting the model first.
"""
import os
import subprocess
import sys
// file: vecadd_test.cu
#include <cstdio>
#include <cstdlib>
#define CUDA_CHECK(call) do { \
cudaError_t err = call; \
if (err != cudaSuccess) { \
fprintf(stderr, "CUDA error %s:%d: %s\n", \
__FILE__, __LINE__, cudaGetErrorString(err)); \
exit(EXIT_FAILURE); \
import re
from typing import Any, Text, Dict, List
bn_num_string = [
'শূন্য', 'এক', 'দুই', 'তিন', 'চার', 'পাঁচ', 'ছয়', 'সাত', 'আট', 'নয়', 'দশ', 'এগারো', 'বারো', \
'তেরো', 'চৌদ্দ', 'পনেরো', 'ষোলো', 'সতেরো', 'আঠারো', 'উনিশ','বিশ','একুশ', 'বাইশ', 'তেইশ', 'চব্বিশ', 'পঁচিশ', 'ছাব্বিশ', \
'সাতাশ', 'আঠাশ', 'উনোতিরিশ', 'তিরিশ', 'একতিরিশ', 'বতিরিশ', 'তেতিরিশ', 'চৌতিরিশ', 'পঁয়তিরিশ', 'ছতিরিশ', 'সাঁইতিরিশ', 'আটতিরিশ', 'উনোচল্লিশ',\
'চল্লিশ','একচল্লিশ', 'বিয়াল্লিশ', 'তেতাল্লিশ', 'চুয়াল্লিশ', 'পঁয়তাল্লিশ', 'ছেচল্লিশ', 'সাতচল্লিশ', 'আটচল্লিশ', 'উনোপঞ্চাশ', 'পঞ্চাশ', 'একান্ন',\
'বাহান্ন', 'তিপ্পান্ন', 'চুয়ান্ন', 'পঞ্চান্ন', 'ছাপ্পান্ন', 'সাতান্ন', 'আটান্ন', 'উনোষাট','ষাট','একষট্টি', 'বাষট্টি', 'তেষট্টি', 'চৌষট্টি', 'পঁয়ষট্টি', \

---- resume-to-JSON prompt ----

parser_prompt = f""" You are an intelligent resume parser for the HR department. Read the raw CV text delimited by <<< and >>>, then return a single valid JSON object—no markdown, no commentary.

<<< {text}

Schema to follow exactly:

@ehzawad
ehzawad / lecun.py
Created June 14, 2025 19:33
LeCun neural network implementation
import torch
import torch.nn as nn
import torch.optim as optim
import torchvision
import torchvision.transforms as transforms
from torch.optim.lr_scheduler import ReduceLROnPlateau
from torch.utils.data import random_split, DataLoader
from multiprocessing import freeze_support
def main():
#!/bin/bash
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
BOLD='\033[1m'
NC='\033[0m'
get_size() {

/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