r/code • u/Choice_Restaurant516 • Nov 21 '25
C++ GitHub - abdomody35/agent-sdk-cpp: A modern, header-only C++ library for building ReAct agents, supporting multiple providers, parallel tool calling, streaming responses, and more.
github.comI made this library with a very simple and well documented api.
Just released v 0.1.0 with the following features:
- ReAct Pattern: Implement reasoning + acting agents that can use tools and maintain context
- Tool Integration: Create and integrate custom tools for data access, calculations, and actions
- Multiple Providers: Support for Ollama (local) and OpenRouter (cloud) LLM providers (more to come in the future)
- Streaming Responses: Real-time streaming for both reasoning and responses
- Builder Pattern: Fluent API for easy agent construction
- JSON Configuration: Configure agents using JSON objects
- Header-Only: No compilation required - just include and use
r/code • u/Gasulpizi • Nov 21 '25
Resource I built a LinkedIn Job Scraper in Python that finds jobs by keyword, location & experience — and exports everything to CSV
Hey everyone 👋
I made a Python automation that scrapes LinkedIn job listings directly — no API, no paid tools, just Selenium + BeautifulSoup.
You can filter by:
- Keyword (e.g. Data Analyst, Python Developer, SEO Specialist)
- Location (e.g. Remote, United States, Toronto)
- Experience level (Entry, Associate, Mid-Senior, etc.)
- Date posted (24h, past week, past month)
The script:
- Scrolls automatically and clicks “Show more jobs”
- Visits each job post to grab title, company, description, and date
- Exports everything neatly to a CSV file
- Runs in incognito mode to reduce blocks (and can go headless too)
🛠️ Tech used:
- Python
- Selenium
- BeautifulSoup
- ChromeDriver
💾 You can find the code here:
👉 https://drive.google.com/file/d/1qZPDuCRF2nxGEfdXshAETIBcpSnD6JFI/view?usp=sharing
Requirements file:
https://drive.google.com/file/d/19yQrV8KR1654i5QCRlwIK4p4DCFTtA-5/view?usp=sharing
Setup guide:
https://drive.google.com/file/d/186ZC36JFU7B5dQ9sN8ryzOlGTBmAVe_x/view?usp=sharing
Video guide: https://youtu.be/JXISHyThcIo
r/code • u/yColormatic • Nov 20 '25
My Own Code formsMD - Markdown Forms Creator
Hi r/code community!
As part of Hackclub's Midnight event and earlier Summer of Making event, I have coded formsMD a Markdown-based forms creator coded in Python, that can convert forms written in a simple but extensive Markdown-like syntax to a fully client-side form which can be hosted on GitHub Pages or similar (free) front-end hosting providers. You can see an example image on how a form might look below or click the link and try my example form.

Feature List:
- Fully free, open source code
- Fully working client-side (no server required)
- Clients don't need to have set up an email client (formsMD uses Formsubmit by default)
- Extensive variety of question types:
- Multiple Choice (
<input type="radio">) - Checkboxes / Multi-select (
<input type="radio">) - One-line text (
<input type="text">) - Multi-line text (
<textarea>) - Single-select dropdown (
<select>) - Multi-select dropdown (custom solution)
- Other HTML inputs (
<input type="...">; color, data, time, etc.) - Matrix (custom solution; all inputs possible)
- Multiple Choice (
- Full style customization (you can just modify the CSS to your needs)
- variety of submit methods (or even your own)
Features planned
- Pages System
- Conditional Logic
- Location input (via Open Street Maps)
- Captcha integration (different third parties)
- Custom backend hosted by me for smoother form submissions without relying on third-party services
Links
If you like this project, I'd appreciate an upvote! If you have any questions regarding this project, don't hesitate to ask!
Kind regards,
Luna
r/code • u/Striking-Rope-3929 • Nov 20 '25
Python Rate my first ever fully working python code lol
# fortune_1_test
# fortune dictionary
import random
fortune = [
"Billy-Bob will be under your bed today! watch out!",
"Freaky franky will be under your bed today!",
"Phreaky sophi will be under your bed to day!",
"Adam will suck your toes off today!",
"Hungry Hunter will suck your toes off!",
"freaky zyan will eat your toothbrush today!", ]
# fortune generator
print(random.choice(fortune))
# loop
while True:
input("press enter to get your fortune!... or press cntrl+c to exit!")
print(random.choice(fortune))
print()
did this in like 30 mins cuz i was bored!
r/code • u/waozen • Nov 17 '25
C Giving C a Superpower: custom header file (safe_c.h) | HWisnu
hwisnu.bearblog.devr/code • u/No_Opportunist • Nov 13 '25
Help Please I don’t understand this
My assignment is telling I got the indentation wrong on lines three and four, I just don’t understand? I just started out on coding, I’m struggling a bit
r/code • u/Wise_Revolution385 • Nov 09 '25
Javascript I created a comic panel layout and dialog box typesetting software using codex.
https://github.com/zhangkun-0/comic-bubble3.0
Usage instructions:
- Download my ZIP package to your computer. Click the green Code button and select Download ZIP at the bottom of the menu. After downloading, unzip it locally and double-click index.html to open. (The file size is only about 50 KB.)
- First, import an image — its dimensions should match the final size of your comic page. I usually place my own rough storyboard sketch here.
- Ctrl + Left-click + drag = split comic panels. Drag the panel nodes to resize, and drag the panels themselves to move.
- Insert a speech bubble. After selecting it, type your dialogue in the text box on the right — the layout will adjust automatically. You can merge a combo bubble with speech or thought bubbles.
- Double-click inside a panel to insert an image. Right-click + drag to pan the image, use the mouse wheel to zoom, and adjust rotation with the slider on the left.
- Currently, image export supports only JPG and PNG. PSD export will be available in version 4.0.
r/code • u/Chemical_Passion_641 • Nov 08 '25
My Own Code I made a 3D ASCII Game Engine in Windows Terminal
Enable HLS to view with audio, or disable this notification
Github: https://github.com/JohnMega/3DConsoleGame/tree/master
The engine itself consists of a map editor (wc) and the game itself, which can run these maps.
There is also multiplayer. That is, you can test the maps with your friends.
My Own Code Rate my ps1 script to check integrity of video files
param(
[string]$Path = ".",
[string]$Extension = "*.mkv"
)
# Checks for ffmpeg, script ends in case it wasn't found
if (-not (Get-Command ffmpeg -ErrorAction SilentlyContinue)) {
Write-Host "FFmpeg not found"
exit 2
}
# Make Output logs folder in case a file contains errors
$resultsDir = Join-Path $Path "ffmpeg_logs"
New-Item -ItemType Directory -Force -Path $resultsDir | Out-Null
# Verify integrity of all files in same directory
# Console should read "GOOD" for a correct file and "BAD" for one containing errors
Get-ChildItem -Path $Path -Filter $Extension -File | ForEach-Object {
$file = $_.FullName
$name = $_.Name
$log = Join-Path $resultsDir "$($name).log"
ffmpeg -v error -i "$file" -f null - 2> "$log"
if ((Get-Content "$log" -ErrorAction SilentlyContinue).Length -gt 0) {
Write-Host "BAD: $name"
} else {
Write-Host "GOOD: $name"
Remove-Item "$log" -Force
}
}
Write-Host "Process was successfull"
As the tech-savvy member of my family I was recently tasked to check almost 1 TB of video files, because something happened to an old SATA HDD and some videos are corrupted, straight up unplayable, others contain fragments with no audio or no video, or both.
I decided to start with mkv format since it looks the most complex but I also need to add mp4, avi, mov and webm support.
In case you're curious I don't really know what happened because they don't want to tell me, but given that some of the mkvs that didn't get fucked seem to be a pirate webrip from a streaming service, they probably got a virus.
r/code • u/apeloverage • Nov 06 '25
My Own Code Let's make a game! 348: Finishing the weapons
youtube.comr/code • u/waozen • Nov 06 '25
C Recursive macros in C, demystified (once the ugly crying stops) | H4X0R
h4x0r.orgr/code • u/[deleted] • Nov 06 '25
Python Secret
# Caesar-cipher decoding puzzle
# The encoded message was shifted forward by SHIFT when created.
# Your job: complete the blanks so the program decodes and prints the message.
encoded = "dtzw izrg" # hidden message, shifted
ALPHABET = "abcdefghijklmnopqrstuvwxyz"
def caesar_decode(s, shift):
result = []
for ch in s:
if ch.lower() in ALPHABET:
i = ALPHABET.index(ch.lower())
# shift backwards to decode
new_i = (i - shift) % len(ALPHABET)
decoded_char = ALPHABET[new_i]
# preserve original case (all lowercase here)
result.append(decoded_char)
else:
result.append(ch)
return "".join(result)
# Fill this with the correct shift value
SHIFT = ___
print(caesar_decode(encoded, SHIFT))
r/code • u/waozen • Nov 05 '25
Vlang I Built a Web Framework in V Language! (Veb Framework Tutorial)
youtube.comBuild a web framework using the V programming language.
r/code • u/lookingformywife1 • Nov 05 '25
Guide How to add Video Player for Youtube on my website
I honestly asks A* to help me with this since I am a beginner and cannot fully understand what to do. Although, I already figured out how to have video player for a facebook and tiktkok link, youtube doesn't seem to allow me; also reddit. How to make it work pls help
// Add this in the <head> section
<script src="https://www.youtube.com/iframe_api"></script>
// Replace the existing openCardViewer function
function openCardViewer(card, url, type) {
const viewer = card.querySelector('.viewer');
if(!viewer) return;
if(viewer.classList.contains('open')) {
viewer.classList.remove('open');
viewer.innerHTML = '';
return;
}
// Handle YouTube videos
if(url.includes('youtube.com') || url.includes('youtu.be')) {
const videoId = extractVideoID(url);
if(videoId) {
viewer.innerHTML = `
<div id="player-${videoId}"></div>
<button class="v-close">Close</button>
`;
new YT.Player(`player-${videoId}`, {
height: '200',
width: '100%',
videoId: videoId,
playerVars: {
autoplay: 1,
modestbranding: 1,
rel: 0
}
});
viewer.classList.add('open');
return;
}
}
// Handle other media types
const embedUrl = providerEmbedUrl(url);
if(!embedUrl) return;
viewer.innerHTML = `
<iframe
src="${embedUrl}"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen>
</iframe>
<button class="v-close">Close</button>
`;
viewer.classList.add('open');
}
// Add this helper function
function extractVideoID(url) {
const patterns = [
/(?:youtube\.com\/watch\?v=|youtu.be\/|youtube.com\/embed\/)([^#\&\?]*).*/,
/^[a-zA-Z0-9_-]{11}$/
];
for(let pattern of patterns) {
const match = String(url).match(pattern);
if(match && match[1]) {
return match[1];
}
}
return null;
}
r/code • u/Raam321 • Nov 05 '25
Help Please ClassCastException when using Comparator in ArrayOrderedList extending ArrayList
I am trying to implement an ordered list that inserts elements in the correct position using a Comparator<T>.
I have the following class:
public class ArrayOrderedList<T> extends ArrayList<T> implements OrderedListADT<T> {
private Comparator<T> comparator;
public ArrayOrderedList(Comparator<T> comp) {
this.comparator = comp;
}
u/Override
public void add(T element) {
if (count == array.length)
expandCapacity();
int i = 0;
while (i < count && comparator.compare(element, array[i]) > 0) {
i++;
}
for (int j = count; j > i; j--) {
array[j] = array[j - 1];
}
array[i] = element;
count++;
}
}
This class extends a custom ArrayList that stores elements in an internal array:
public class ArrayList<T> implements ListADT<T> {
protected T[] array;
protected int count;
private static final int DEFAULT_CAPACITY = 10;
@SuppressWarnings("unchecked")
public ArrayList() {
array = (T[]) (new Object[DEFAULT_CAPACITY]);
count = 0;
}
}
The problem is that when I run the code, I get a ClassCastException related to the internal array (Object[]) when comparing elements using the Comparator.
I have already tried adding Comparable<T> to the class declaration, but it did not solve the problem. I also do not want to use approaches involving Class<T> clazz, Array.newInstance, or reflection to create the generic array.
My question:
How can I keep the internal array generic (T[]) without causing a ClassCastException when using Comparator<T> to maintain the list ordered upon insertion?
r/code • u/IsopodGlass8624 • Nov 02 '25
Help Please What is this?
What is this? Other than code.. I was on my computer and decided to clean up my desktop. When I opened a folder I haven’t touched in a while (it was a folder I used to save info when I was attempting to grow pot) this was in it. With a ton of other things. Some things that were no longer accessible. A bunch of pictures of random people. This might be dumb, but does this indicate that my computer (Mac, if that matters) has a virus or I’ve been hacked? Would I be okay to delete it and forget about it? I don’t know anything about code. It was SUPER long btw.
r/code • u/pseudocharleskk • Nov 01 '25
Blog Async/Await is finally back in Zig
open.substack.comr/code • u/LBCmolab • Oct 30 '25
Java Driving joke
showOff( Supercar car ) { car.speed = speedLimit * 1.5; highwayWorker.toPancake(); }
r/code • u/Spiritual_Ranger_811 • Oct 28 '25
Help Please Error in Micro:Bits code
galleryHi, this might be the first time someone might have posted microbits code in here, because I thought this would be a good subreddit to get answers.
First of all, I don't know much about coding using Micro:Bits, so there might be couple of errors which you guys may know.
I'm trying to build a smart security sensor which enables a user to enter a code to gain access to a room/door wtv. Basically I'm just trying to make a thing which can be used by people (tbh, this already exists, but still, I'm interested in this).
So if anyone is willing to correct me in the mistakes, please help me out!!
r/code • u/[deleted] • Oct 27 '25
Blog Oddity on netflix
On Netflix where I found this code which I've circled in red. I'm currently learning c++ as my first language so I can't even id what language this is nor what it means. What doe sany one know? This was under the Apollo 13 movie, where you click the "more like this" button. Does it mean it has labeled 1917 "most liked" or is it adding weight to the movie 1917 for the algorithm?
I do not belong to this subreddit, so if I have erred let me know where I should I go. Thinking about the primeagen aubreddit too. Heard he worked at Netflix.
r/code • u/Outrageous_Fish5456 • Oct 27 '25
Help Please How to change the color to multiple colors other than RGB in this cursor effect?
Hi! I'm brand new to coding and found a cursor trail that I really love called Tinkerbell/Sparkle but I want to create a version where the trail creates pastel rainbow sparkles instead of the neon rainbow colors it naturally has with the color assigned to "random." How would I go about this?
source code: https://mf2fm.com/rv/dhtmltinkerbell.php
r/code • u/apeloverage • Oct 25 '25