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
{"name":"vscode","settings":"{\"settings\":\"{\\n \\\"editor.cursorBlinking\\\": \\\"smooth\\\",\\n \\\"files.autoSave\\\": \\\"onFocusChange\\\",\\n \\\"editor.fontSize\\\": 14,\\n \\\"editor.fontFamily\\\": \\\"JetBrainsMono Nerd Font Propo\\\",\\n \\\"terminal.integrated.fontFamily\\\": \\\"JetBrainsMono Nerd Font Propo\\\",\\n \\\"files.trimTrailingWhitespace\\\": true,\\n \\\"workbench.editor.highlightModifiedTabs\\\": true,\\n \\\"workbench.iconTheme\\\": \\\"eq-material-theme-icons-palenight\\\",\\n \\\"python.analysis.addImport.exactMatchOnly\\\": true,\\n \\\"python.analysis.autoFormatStrings\\\": true,\\n \\\"python.analysis.addImport.heuristics\\\": true,\\n \\\"python.analysis.autoImportCompletions\\\": true,\\n \\\"python.analysis.extraCommitChars\\\": true,\\n \\\"python.terminal.activateEnvInCurrentTerminal\\\": true,\\n \\\"editor.minimap.maxColumn\\\": 70,\\n \\\"workbench.colorTheme\\\": \\\"Dracula Pro\\\",\\n \\\"indentRainbow.indicatorSty |
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 threading | |
import time | |
import requests | |
# Set the URL to send requests to (choose a test server or an address that responds quickly) | |
URL = "https://httpbin.org/get" | |
# Total number of requests to be made | |
NUM_REQUESTS = 1000 | |
NUM_THREADS = 50 |
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 hashlib | |
from functools import lru_cache | |
from json.decoder import JSONDecodeError | |
from typing import Any, Dict, Optional, Type | |
from fastapi import Request | |
from sqlalchemy import select | |
from libs.db import get_db_session | |
from libs.exceptions import ErrorCode | |
from libs.models import Operator | |
class SignatureService: |
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
# A safety wrapper for git reset commands | |
# Prompts for confirmation before executing potentially destructive reset operations | |
# Usage: Just use git reset or git reset --hard as normal, it will ask for confirmation (y/n) | |
function git() { | |
if [ "$1" = "reset" ]; then | |
if [ "$2" = "--hard" ]; then | |
echo -n "Are you sure you want to execute 'git reset --hard'? (y/n): " | |
read REPLY | |
if [[ $REPLY =~ ^[Yy]$ ]]; then | |
command git "$@" |
OlderNewer