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
#pylint:disable=W0621 | |
import math | |
def prime(n): | |
# Handle base cases | |
if n < 2: | |
return 0 | |
if n == 2 or n == 3: | |
return 1 |
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 <iostream> | |
#include <cmath> | |
#include <string> | |
#include <iomanip> | |
bool prime(unsigned long long n) { | |
if (n <= 1) return false; | |
if (n <= 3) return true; | |
if (n % 2 == 0 || n % 3 == 0) 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 | |
import requests | |
import sys | |
# Configure these variables with your actual Cloudflare account details | |
ACCOUNT_ID = "your_account_id_here" # eg. "6a2784243169ac723308b65ae743e5ca" | |
API_TOKEN = "your_api_token_here" # eg. "a-FJVHPa04_9TS0L5RjYIcTgtLfc8NwP9PNqyd6m" | |
def main(): |
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 * as React from "react"; | |
import { cn } from "@/lib/utils"; | |
const Textarea = React.forwardRef< | |
HTMLTextAreaElement, | |
React.ComponentProps<"textarea"> | |
>(({ className, ...props }, ref) => { | |
const textareaRef = React.useRef<HTMLTextAreaElement | null>(null); | |
const calculateHeight = React.useCallback(() => { |
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 flask import Flask, request, jsonify, send_file | |
from flask_cors import CORS | |
import os | |
import yt_dlp | |
import glob | |
app = Flask(__name__) | |
CORS(app) | |
DOWNLOAD_DIR = os.path.join(os.getcwd(), "downloads") |
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
// ==UserScript== | |
// @name YouTube Video Speed Controller | |
// @namespace https://your.namespace.here | |
// @version 3.3.1 | |
// @description Control playback speed on YouTube with keyboard. | |
// @author Nusab Taha | |
// @license MIT | |
// @match https://www.youtube.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com | |
// ==/UserScript== |
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
// Credit: Nusab Taha @Nusab19 | |
// Gist: https://gist.github.com/Nusab19/fc8d96ae73a910acb8403758dc41f8c5 | |
let _inputData="",_inputArray=[],_count=-1;function input(){let n=_inputArray[_count];return _count++,n}process.stdin.setEncoding("utf8"),process.stdin.on("data",(function(n){_inputData+=n})),process.stdin.on("end",(function(){_inputArray=_inputData.split("\n"),input(),main()})); | |
// You need to code everything in this main function. | |
function main() { | |
// input function will return a `string` or `undefined`. | |
// `undefined` means there's no more input left. |
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
// Credit: Nusab Taha @Nusab19 | |
// Minimized Version: https://gist.github.com/Nusab19/fc8d96ae73a910acb8403758dc41f8c5 | |
// Do not change anything from here.... | |
let _inputData = ""; | |
let _inputArray = []; | |
let _count = -1; | |
process.stdin.setEncoding("utf8"); | |
process.stdin.on("data", function (chunk) { | |
_inputData += chunk; | |
}); |