Skip to content

Instantly share code, notes, and snippets.

View codepediair's full-sized avatar
🏠
Working from home

Mahdi codepediair

🏠
Working from home
View GitHub Profile
@codepediair
codepediair / nowroz.bat
Created March 21, 2025 10:58
happy nowroz python code
@echo off & python -x "%~f0" %* & goto :eof
# ==========================================================
# one way to place python script in a batch file
# place python code below (no need for .py file)
# ==========================================================
import sys
import time
from random import randint
# Import required libraries
import pandas as pd
import yfinance as yf
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error
import numpy as np
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Snake ASTAR Auto</title>
</head>
<style>
body {
text-align: center;
@codepediair
codepediair / index.html
Created September 18, 2024 10:25
github globe code in jquery and three js
<div class="credits">
<p>Credit to</p>
<a href="https://github.com/home" target="_blank">
<img width="100" height="26" class="githublogo" alt="GitHub Logotype" src="https://github.githubassets.com/images/modules/logos_page/GitHub-Logo.png">
</a>
</div>
<div class="container">
<img src="https://github.githubassets.com/images/modules/site/home/hero-glow.svg" alt="Glowing universe" class="background-lights">
<div id="globeCanvas">
</div>
@codepediair
codepediair / index.html
Created September 4, 2024 12:41
create lazy 1024 with javascript
<div id=container><canvas id=backcanvas></canvas><canvas id=canvas></canvas>
<div id=load>
<h1>Loading</h1></div>
<div id=home>
<h1>Lazy 2048</h1>
<p><b>How to play:</b><br>⭐️ Drag pieces around<br>⭐️ Stack those with the same number<br>⭐️ Get to 2048 to win the game<br>⭐️ Or Sit simply<small>(recommended for highly lazy ones)</small></p>
<div id=start>NEW GAME</div>
<div id=menu><input type=checkbox class=opt id=m checked=checked><label for=m>Music</label><br><input type=checkbox class=opt id=s checked=checked><label for=s>Sound FX</label><br><input type=checkbox class=opt id=q checked=checked><label for=q>High Quality</label></div>
</div>
@codepediair
codepediair / index.pug
Created August 25, 2024 08:11
tetris game in pug and javascript
div(id='outer-board')
div(id='board')
div(id='banner')
div
div(id='message')
div(id='new-game') Tap here to start!
- var n=0;
while n < 160
div(class="empty")
div(class="inner-tile")
@codepediair
codepediair / index.html
Created August 16, 2024 13:41
floating tabs
<section class="page">
<section>
<ul class="tabs-controls">
<li class="tabs-controls__item">
<a href="#" class="tabs-controls__link tabs-controls__link--active" data-id="1">
Tab A
</a>
</li>
<li class="tabs-controls__item">
<a href="#" class="tabs-controls__link" data-id="2">
@codepediair
codepediair / index.html
Created June 30, 2024 06:43
Create a game with three.js
<div id="counter">0</div>
<div id="controlls">
<div>
<button id="forward">
<svg width="30" height="30" viewBox="0 0 10 10">
<g transform="rotate(0, 5,5)">
<path d="M5,4 L7,6 L3,6 L5,4" />
</g>
</svg>
@codepediair
codepediair / index.html
Last active June 23, 2024 07:36
Music Player With Tailwind and JavaScript
<body class="">
<div class="absolute right-4 top-4">
<div id="dark-mode-toggle" class="cursor-pointer">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 stroke-white hidden dark:block" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 stroke-[#0A1122] block dark:hidden" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z" />
</svg>
</div>
<html>
<head>
<link rel="stylesheet" href="style.css"/>
</head>
<body>
<h3>
Play KeyBoard by pressing (A S D F G H J K L ;)<br> and (W E T Y U O P)
</h3>
<div class="floor"></div>