Skip to content

Instantly share code, notes, and snippets.

View cyai's full-sized avatar

Vardhaman cyai

View GitHub Profile
@cyai
cyai / gitignore
Created February 26, 2024 21:40
standard .gitignore file
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
@cyai
cyai / nodejs-Dockerfile
Created February 27, 2024 10:38
standard Dockerfile for nodejs application
# syntax = docker/dockerfile:1
# Adjust NODE_VERSION as desired
ARG NODE_VERSION=18.9.0
FROM node:${NODE_VERSION}-slim as base
LABEL fly_launch_runtime="Node.js"
# Node.js app lives here
WORKDIR /app
@cyai
cyai / knight_move.rs
Created April 14, 2024 11:34
This program implements the backtracking algorithm to solve the Knight's Tour problem on a chessboard.
use std::env;
use std::process::Command;
use std::time::Duration;
use std::{thread, vec};
fn print_board(size_x: i32, _size_y: i32, board: &Vec<Vec<i32>>) {
println!("Knight's Tour Problem");
println!("Chess Board:");
print!(" ");
for _ in 0..size_x {