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 { useRef, type SubmitEvent } from "react"; | |
| export function APITester() { | |
| const responseInputRef = useRef<HTMLTextAreaElement>(null); | |
| const testEndpoint = async (e: SubmitEvent<HTMLFormElement>) => { | |
| e.preventDefault(); | |
| try { | |
| const form = e.currentTarget; |
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/env python | |
| import sys | |
| # TestCase = (nums, k, possible_results) | |
| type TestCase = tuple[list[int], int, list[set[int]]] | |
| def k_most_frequent(nums: list[int], k: int) -> set[int]: | |
| """ | |
| Returns a set of k most frequently recurring unique numbers. |
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 <stdint.h> | |
| #include <stddef.h> | |
| #include <assert.h> | |
| #include <stdbool.h> | |
| #include <inttypes.h> | |
| #define CAP_GROWTH_RATE 2 |
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 time | |
| import heapq | |
| import unittest | |
| import threading | |
| from typing import Any, Optional | |
| from collections.abc import Hashable | |
| class _MissingType: | |
| """ |
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
| FROM kalilinux/kali-rolling | |
| # Avoid interactive prompts during install | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # Update + install common CTF tools | |
| RUN apt-get update && apt-get install -y \ | |
| kali-tools-top10 \ | |
| kali-tools-web \ | |
| kali-tools-wireless \ |
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
| type WebhookEventAttributes = { | |
| http_request: { | |
| client_ip: string; | |
| user_agent: string; | |
| }; | |
| }; | |
| type Webhook<EvtType, Data> = { | |
| type: EvtType; | |
| object: 'event'; |
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
| class Klass: | |
| @property | |
| def value_a(self) -> bool: | |
| print('Value a accessed') | |
| return False | |
| @property | |
| def value_b(self) -> bool: | |
| print('Value b accessed') | |
| return False |
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/env python3 | |
| """ | |
| File: earth911.py | |
| Author: mentix02 (Manan manan.yadav02@gmail.com) | |
| Task: Scrape search results of search.earch911.com and extract data into a CSV file. | |
| Making a request to search.earth911.com by spoofing the headers to make it look like you're coming from a | |
| browser. We are returned with plain HTML - no JSON API to reverse engineer unfortunately. Parsing this HTML, | |
| we get a list of hrefs over which we loop (asynchronously, of course) and fetch details of the individual | |
| centre (in HTML - from which we extract a dictionary of properties). |
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 z from "zod"; | |
| import { createContext } from "react"; | |
| export const AuthDataSchema = z | |
| .object({ | |
| id: z.string().optional(), | |
| name: z.string().optional(), | |
| email: z.string().email().optional(), | |
| token: z.string().optional(), |
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 sys | |
| import time | |
| import random | |
| import asyncio | |
| import argparse | |
| from typing import Callable, Coroutine | |
| import httpx | |
| import aiohttp | |
| import requests |
NewerOlder