Skip to content

Instantly share code, notes, and snippets.

View dipendra-sharma's full-sized avatar

Dipendra Sharma dipendra-sharma

View GitHub Profile
@dipendra-sharma
dipendra-sharma / number_to_indian_words_hindi.py
Created April 21, 2025 18:04
A Python function/script that takes a numerical input and returns its representation in Hindi words (Devanagari script), following the Indian place value system (e.g., लाख, करोड़).
# Complete mapping for 0-99 in Hindi
hindi_numbers_0_99 = [
'शून्य', 'एक', 'दो', 'तीन', 'चार', 'पाँच', 'छह', 'सात', 'आठ', 'नौ',
'दस', 'ग्यारह', 'बारह', 'तेरह', 'चौदह', 'पंद्रह', 'सोलह', 'सत्रह', 'अठारह', 'उन्नीस',
'बीस', 'इक्कीस', 'बाईस', 'तेईस', 'चौबीस', 'पच्चीस', 'छब्बीस', 'सत्ताईस', 'अट्ठाईस', 'उनतीस',
'तीस', 'इकतीस', 'बत्तीस', 'तैंतीस', 'चौंतीस', 'पैंतीस', 'छत्तीस', 'सैंतीस', 'अड़तीस', 'उनतालीस',
'चालीस', 'इकतालीस', 'बयालीस', 'तैंतालीस', 'चवालीस', 'पैंतालीस', 'छियालीस', 'सैंतालीस', 'अड़तालीस', 'उनचास',
'पचास', 'इक्यावन', 'बावन', 'तिरेपन', 'चौवन', 'पचपन', 'छप्पन', 'सत्तावन', 'अट्ठावन', 'उनसठ',
'साठ', 'इकसठ', 'बासठ', 'तिरसठ', 'चौंसठ', 'पैंसठ', 'छियासठ', 'सड़सठ', 'अड़सठ', 'उनहत्तर',
'सत्तर', 'इकहत्तर', 'बहत्तर', 'तिहत्तर', 'चौहत्तर', 'पचहत्तर', 'छिहत्तर', 'सत्तहत्तर', 'अठहत्तर', 'उन्यासी',
@dipendra-sharma
dipendra-sharma / code-editor-rules.md
Created April 9, 2025 16:27 — forked from yifanzz/code-editor-rules.md
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@dipendra-sharma
dipendra-sharma / SudokuSolver.kt
Created April 5, 2025 12:12
SudokuSolver in kotlin
class SudokuSolver(private val board: Array<IntArray>) {
fun solve(): Boolean {
val emptyCell = findEmptyCell() ?: return true
for (number in 1..9) {
if (isValid(emptyCell.first, emptyCell.second, number)) {
board[emptyCell.first][emptyCell.second] = number
if (solve()) {
@dipendra-sharma
dipendra-sharma / tool-update.sh
Created March 10, 2025 12:54
Tools Update command
brew update && brew upgrade --greedy && brew upgrade --cask --greedy && brew cleanup && rbenv install $(rbenv install -l | sed -n '/^[[:space:]]*[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}[[:space:]]*$/ h;${g;p;}') -s && gem update --system && gem update && nvm install --lts && nvm use --lts && nvm alias default node && npm update -g && npm install -g npm@latest && npm install -g corepack@latest && corepack install -g yarn@latest pnpm@latest && sdk update && pip install --upgrade pip
@dipendra-sharma
dipendra-sharma / Utils.kt
Created February 27, 2025 11:16
Retrieving OpenGLES version and Vulkan version in Android using kotlin
package com.dipendrasharma.myapplication
import android.app.ActivityManager
import android.content.Context
import android.content.pm.ConfigurationInfo
fun getOpenGLESVersion(context: Context): String {
val activityManager = context.getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager
val configurationInfo: ConfigurationInfo = activityManager.deviceConfigurationInfo
@dipendra-sharma
dipendra-sharma / README.md
Created February 18, 2025 20:28 — forked from abelcallejo/README.md
Creating bootable Linux USB using Mac

Creating bootable Linux USB using Mac

mac

CentOS, Ubuntu, Slackware, etc. Whatever Linux-based OS it is, you can create a bootable USB for it by using a Mac.

1. Prepare the .iso file

Download it, copy it, whatever it takes to prepare that Linux-based OS .iso file

2. Convert the .iso file into a .img.dmg

@dipendra-sharma
dipendra-sharma / custom_gesture_detector.dart
Created January 23, 2025 11:19 — forked from GAM3RG33K/custom_gesture_detector.dart
Advanced multi touch gesture detection in flutter
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'multi_drag_gestures.dart';
typedef GestureMultiDragUpdateCallback = void Function(
Offset initialPosition, Offset latestPosition, double delta);
typedef GestureMultiDragEndCallback = void Function(
Offset initialPosition, Offset latestPosition, double delta);
typedef GestureMultiDragCancelCallback = void Function();
@dipendra-sharma
dipendra-sharma / contemplative-llms.txt
Created January 8, 2025 13:08 — forked from Maharshi-Pandya/contemplative-llms.txt
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@dipendra-sharma
dipendra-sharma / docker-compose.yml
Created October 16, 2024 17:05 — forked from shinux/docker-compose.yml
mac m1 (Apple Silicon) docker kafka (include zookeeper)
version: "2"
services:
zookeeper:
image: docker.io/bitnami/zookeeper:3
ports:
- "2181:2181"
volumes:
- "zookeeper_data:/bitnami"
environment:
@dipendra-sharma
dipendra-sharma / app_initializer.dart
Created June 28, 2024 09:23
A lightweight, flexible Flutter widget for managing app initialisation with a customisable splash screen.
class AppInitializer extends StatefulWidget {
final Future Function() onAppInit;
final Widget Function(BuildContext) splashBuilder;
final Widget Function(BuildContext) appBuilder;
const AppInitializer(
{super.key,
required this.splashBuilder,
required this.appBuilder,