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 subprocess | |
| import sys | |
| def main() -> int: | |
| result = subprocess.run(["git", "status"], capture_output=True, text=True) | |
| if result.stdout: | |
| sys.stdout.write(result.stdout) | |
| if result.stderr: | |
| sys.stderr.write(result.stderr) |
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 math | |
| import pygame | |
| import random | |
| class Ecosystem: | |
| def __init__(self, width, height): | |
| self.width = width | |
| self.height = height |
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 PIL import Image | |
| def convert_webp_to_gif(webp_file, gif_file): | |
| # Open the WEBP file using the PIL library | |
| webp_image = Image.open(webp_file) | |
| # Initialize lists to store the frames and durations of the WEBP image | |
| frames = [] | |
| durations = [] | |
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 asyncio | |
| import aiohttp | |
| from bs4 import BeautifulSoup | |
| base_url = "https://control.fandom.com" | |
| all_collectibles = "/wiki/Collectibles/List_of_Collectibles" | |
| def stats(text): |
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
| # Minimum moves solver for https://www.funnyhowtheknightmoves.com/ | |
| from collections import deque | |
| import chess | |
| def main(): | |
| destinations = [chess.F8, chess.E8, chess.C8, chess.B8, | |
| chess.H7, chess.G7, chess.E7, chess.C7, chess.A7, |
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
| using BenchmarkDotNet.Attributes; | |
| using BenchmarkDotNet.Running; | |
| using CommunityToolkit.HighPerformance; | |
| public struct Position { | |
| public float x; | |
| public float y; | |
| }; | |
| public class TestStructModification { |
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 argparse | |
| import math | |
| import multiprocessing | |
| import os | |
| import itertools as it | |
| from scipy import ndimage | |
| from skimage.metrics import structural_similarity | |
| import cv2 | |
| import numpy as np |
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 math | |
| import time | |
| import pygame | |
| class Vector: | |
| def __init__(self, p1, p2): | |
| self.x1, self.y1 = p1 | |
| self.x2, self.y2 = p2 |
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
| package main | |
| import ( | |
| "fmt" | |
| "sort" | |
| "strings" | |
| ) | |
| type Shape struct { | |
| grid [][]bool |
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
| use rdev::{simulate, grab, Event, EventType, Key}; | |
| static mut SIMULATED: u32 = 0; | |
| fn main() { | |
| if let Err(error) = grab(callback) { | |
| println!("Error: {:?}", error) | |
| } | |
| } |
NewerOlder