Skip to content

Instantly share code, notes, and snippets.

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

Emrul Hasan Zawad ehzawad

🎃
Wasteland Baby!
View GitHub Profile
import openai
import re
# Define GPT-3.5-turbo API key
openai_api_key = 'YOUR-OPENAI-API-KEY'
openai.api_key = openai_api_key
# Read the Bengali text from the file
with open('/home/ehz/Downloads/nlu.txt', 'r', encoding='utf-8') as file:
bengali_text = file.read()
absl-py==1.4.0
aio-pika==8.2.3
aiofiles==23.1.0
aiogram==2.25.1
aiohttp==3.8.5
aiohttp-retry==2.8.3
aiormq==6.4.2
aiosignal==1.3.1
APScheduler==3.9.1.post1
astunparse==1.6.3
absl-py 1.4.0
aio-pika 8.2.3
aiofiles 23.1.0
aiogram 2.25.1
aiohttp 3.8.5
aiohttp-retry 2.8.3
aiormq 6.4.2
aiosignal 1.3.1
APScheduler 3.9.1.post1
astunparse 1.6.3
@ehzawad
ehzawad / neovim-debian.sh
Last active August 21, 2023 08:46
neovim from source
Access to the latest features of Neovim
Install Neovim in the location you wish
Installation
(1) Install the build prerequisites:
sudo apt-get install ninja-build \
gettext libtool libtool-bin \
autoconf automake cmake g++ \
pkg-config unzip
(2) Clone the Neovim repository:
import ssl
# Get the OpenSSL version
openssl_version = ssl.OPENSSL_VERSION
print(f"OpenSSL Version: {openssl_version}")
# Get the OpenSSL version info (tuple)
openssl_version_info = ssl.OPENSSL_VERSION_INFO
print(f"OpenSSL Version Info: {openssl_version_info}")
import httpx
import asyncio
from collections import OrderedDict
# async def translate_to_arabic(text):
# url = "https://google-translate1.p.rapidapi.com/language/translate/v2"
# payload = {
# "q": text,
# "target": "ar",
# "source": "en"
TensorFlow Bazel configuration file.
# This file tries to group and simplify build options for TensorFlow
#
# ----CONFIG OPTIONS----
# Android options:
# android:
# android_arm:
# android_arm64:
# android_x86:
# android_x86_64:
@ehzawad
ehzawad / mmul_samplecuda.cu
Created August 12, 2023 06:57
cuda programming
#include <stdio.h>
#include <cuda_runtime.h>
#define X 3
#define Y 6
#define Z 10
__global__ void multiplyMatrices(int *a, int *b, int *c) {
int x = blockIdx.x * blockDim.x + threadIdx.x;
int y = blockIdx.y * blockDim.y + threadIdx.y;
<!DOCTYPE html>
<html>
<head>
<style>
#images {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
grid-auto-rows: 150px;
gap: 10px;
padding: 10px;
from multiprocessing import Pool, current_process, cpu_count
import os, time
def io_bound_task(num):
start_time = time.time()
print(f"Process ID: {os.getpid()}, Process Name: {current_process().name}, Starting Task {num}")
time.sleep(2) # simulate I/O-bound task with delay
end_time = time.time()
print(f"Process ID: {os.getpid()}, Process Name: {current_process().name}, Finished Task {num}, Execution time: {end_time - start_time} seconds")