This file contains 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 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 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 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 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 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 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 |