This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def query_summary_code_base(project_path: str, max_file_size: int = 3000) -> str: | |
""" | |
Generate an intelligent prompt from a Next.js project, prioritizing relevant files | |
and providing structured context for AI assistance. | |
Args: | |
project_path (str): Path to the root of the Next.js project. | |
max_file_size (int): Maximum characters to read per file (default: 2000). | |
Returns: | |
str: A comprehensive prompt string optimized for Next.js development context. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import datetime | |
from http.server import HTTPServer, BaseHTTPRequestHandler | |
LINK = 'http://msn.com/' | |
MITRE_MAPPING = { | |
"T1190": "Exploit Public-Facing Application", | |
"T1040": "Network Sniffing", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### CONFIGURATION | |
TAKE_ACTIONS = False # If false, it has no access to terminal and code execution | |
USE_MEMORY = True | |
USE_PYTHON = True | |
USE_CALCULATOR = True | |
USE_SHELL = True | |
USE_WIKI_SEARCH = True | |
USE_SEARCH_ONLINE = True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# source https://gist.github.com/glasslion/b2fcad16bc8a9630dbd7a945ab5ebf5e | |
import os | |
def find_files(directory, extension): | |
""" | |
Recursively finds all files with a specific extension in a directory and its subdirectories. | |
Args: | |
- directory (str): The directory to start the search from. | |
- extension (str): The file extension to search for (e.g., '.txt', '.jpg', etc.). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MACROS AND TYPEDEFS | |
#include <assert.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include <stdbool.h> | |
typedef unsigned int uint; | |
#define UNUSED(x) ((void)(x)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdint.h> | |
#include <limits.h> | |
typedef size_t usize; | |
typedef uint8_t u8; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import asyncio | |
from aiohttp import ClientSession | |
async def fetch(url, session): | |
async with session.get(url) as response: | |
delay = response.headers.get("DELAY") | |
date = response.headers.get("DATE") | |
print("{}:{} with delay {}".format(date, response.url, delay)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const xplm = @import("xplm"); | |
var g_window: xplm.XPLMWindowID = std.mem.zeroes(xplm.XPLMWindowID); | |
pub export fn draw_hello_world(in_window_id: xplm.XPLMWindowID, in_refcon: ?*c_void) callconv(.C) void { | |
_ = in_refcon; | |
_ = in_window_id; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
convertDigits = [ | |
['|', '|', ':', ':', ':'], #0 | |
[':', ':', ':', '|', '|'], #1 | |
[':', ':', '|', ':', '|'], #2 | |
[':', ':', '|', '|', ':'], #3 | |
[':', '|', ':', ':', '|'], #4 | |
[':', '|', ':', '|', ':'], #5 | |
[':', '|', '|', ':', ':'], #6 | |
['|', ':', ':', ':', '|'], #7 |