Skip to content

Instantly share code, notes, and snippets.

View ahmadasjad's full-sized avatar
🛠️
I love making coding easier

AHMAD ASJAD ahmadasjad

🛠️
I love making coding easier
View GitHub Profile
@ahmadasjad
ahmadasjad / ai-agent-instructions.md
Last active July 16, 2025 15:05
ai-agent-instructions.md
applyTo
**

Keep these in mind:

  • if you are going to run any command for the project, try to use docker compose exec <service-name> as prefix, as project is running in docker.
  • If you are modifying a code portion, try not to move the content from line a to line x. Try to modify at the same line if possible. So that it's easy see the differences.
  • when you are asking me a question, make it bold, so that I can see it easily.
  • if you added some file, but later it's not needed, please remove it.
  • If there is a feature to be added, ask me to generate a prompt file first. If I say yes, generate a good prompt file with all the detail of the feature needed. Ask me to review the newly created prompt file, if it all looks ok, then proceed to the actual task by reading the newly generated prompt file.
from flask import Flask, request, jsonify
import torch
import os
import logging
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
logger = logging.getLogger()
@ahmadasjad
ahmadasjad / calculator.py
Created October 20, 2018 18:38
Desktop calculator using Python
from tkinter import *
import re
class Calculator(Frame):
def __init__(self, master=None):
master = self.main_window()
super().__init__(master)
self.pack()
self.create_widgets()
jQuery(document).ready(function () {
/*
* Give an attribute to anchor tag 'js-add' and the value of that attribute
* to be his parent selector which is to be copied and to be added after it.
* For example if you provide <a js-add=".js-field_row">text</a>
* On click of this element will copy its parent element having class js-field_row
* and will after it.
* */
jQuery(document).on('click', 'a[js-add]', function () {
var element_to_clone_selector = jQuery(this).attr('js-add');