Y

@yescode1

ty

Python
1 month ago
<html> <<head> <title>intro js</title> </head> <body> <h1 id="myH"></h1> <p id="m"></p> <h1>JavaScript Variables</h1> <p>Sum of two Numbers</p> <p id="result"></p>

sql 1

SQL
1 month ago
CREATE TABLE IF NOT EXISTS Salesman( Salesman_id TEXT PRIMARY KEY, name TEXT, city TEXT, Comission TEXT ); INSERT INTO Salesman(Salesman_id,name,city,Comission) VALUES ("5001","James Hoog","New York","0.15"), ("5002","Nail Knite","Paris"

j

Python
2 months ago
movies_df['year'] = movies_df.title.str.extract('(\(\d\d\d\d\))', expand = True) movies_df.head() movies_df['year'] = movies_df.year.str.extract('(\d\d\d\d)', expand=True) movies_df.head() movies_df['title'] = movies_df.title.str.replace('(\(\d\d

ytr

Python
2 months ago
def place_order(self): total_cost = 0 order_summary = "Order Summary:\n" currency = self.currency_var.get() symbol = "₹" if currency == "INR" else "$" rate = self.exchange_rate if currency == "INR" else 1

jj

Python
2 months ago
c1, c2 = st.columns([1, 2]) if c1.button("🗑️ Clear"): st.session_state.history = []; st.rerun() if st.session_state.history: c2.download_button("📄 Export", export_txt(st.session_state.history),

ytu

Python
2 months ago
<nav id="safariNav" class="navbar navbar-expand-sm navbar-dark bg-dark sticky-top"> <span class="navbar-brand">🦁 Safari Guide</span> <ul class="navbar-nav"> <li class="nav-item"><a class="nav-link" href="#forest">Forest</a></li>

i

Python
2 months ago
<h4 class="section-title">Featured Planets</h4> <div class="row"> <div class="col-md-4"> <div class="card"> <div class="card-body"> <h5 class="card-title">Earth</h5> <p class="card-text">Our h

j

Python
2 months ago
except ImportError as e: print(f"❌ Missing library: {e.name}") print("\n📦 Install commands:") print(" Windows: pip install SpeechRecognition pyaudio numpy matplotlib") print(" macOS: brew install portaudio && pip install Speech

yuiuo

Python
2 months ago
while True: text = input(f"{Fore.GREEN}>> {Style.RESET_ALL}").strip() if not text: print(f"{Fore.RED}Enter valid text.{Style.RESET_ALL}") continue cmd = text.lower() if cmd == "exit":

ui

Python
2 months ago
y_min, y_max = X[:, 1].min() - 0.5, X[:, 1].max() + 0.5 xx, yy = np.meshgrid( np.arange(x_min, x_max, 0.02), np.arange(y_min, y_max, 0.02) ) # Predict the class for each point Z = logreg.predict(np.c_[xx.ravel(), yy.ravel()]) Z = Z.reshape

fjjkl

Python
2 months ago
<html > <head> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> <style> body { background-color: #f4fff4; font-family: Arial, sans-serif; }

j

Python
2 months ago
print("\n--- DEFAULT value check for Sydney ---") sydney = pd.read_sql("""SELECT City_Name, Country, Is_Capital FROM City WHERE City_Name == 'Sydney';""", conn) print(sydney) print("Is_Capital was not given — DEFAULT 'No' was used automatica

j

Python
2 months ago
def wait_for_enter(): input("\n🎤 Press Enter to stop recording...\n") stop_event.set() def spinner(): chars = '|/-\\' i = 0 while not stop_event.is_set(): sys.stdout.write(f'\r🔴 Recording... {chars[i % 4]}') sys.

uyt

Python
2 months ago
with col_export: if st.session_state.history: # Prepare conversation text for export export_text = "" for idx, qa in enumerate(st.session_state.history, start=1): export_text += f"Q{id

j

Python
2 months ago
# 02-shift-ops.py # Topic: Left Shift Doubles the Number, Divide Without / input("Left shift doubles, right shift halves. Press Enter ") print(" 3 << 1 =", 3 << 1, " 12 >> 1 =", 12 >> 1) print(" 3 << 2 =", 3 << 2, " 12 >> 2 =", 12 >> 2) n =

j

Python
2 months ago
def generate_text(prompt: str, max_new_tokens: int = 220) -> str: txt, err = _run_models(TEXT_MODELS, [{"role": "user", "content": prompt}], max_tokens=max_new_tokens, temperature=0.4) if not txt: raise Exception(err) return tx

yuiuo

Python
2 months ago
def _data_url(path: str) -> str: with open(path, "rb") as f: return "data:image/jpeg;base64," + base64.b64encode(f.read()).decode("utf-8") def query_hf_api(payload: dict): try: r = requests.post(ROUTER_URL, headers=HEADERS

yuiuo

Python
2 months ago
# Method to set up the background image def setup_background(self, root): bg_width, bg_height = 800, 600 canvas = tk.Canvas(root, width=bg_width, height=bg_height) canvas.pack() original_image = tk.PhotoIma

rock paper

Python
2 months ago
import random #importing random module while True: #iterate loop user_action = input("Enter a choice (rock, paper, scissors): ") #take input possible_actions = ["rock", "paper", "scissors"] #using random function computer_action =

j

Python
2 months ago
<div class="top-bar">My Pet Page - Buddy the Labrador</div> <h1>Meet Buddy!</h1> <h2>Static</h2> <div class="list-item">Breed: Labrador</div> <div class="list-item">Age: 2 years old</div> <h2>Relative</h2> <p>This note shi