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
from PIL import Image, ImageDraw | |
import random | |
def generate_maze(width, height): | |
maze = [['wall' for _ in range(width)] for _ in range(height)] | |
# Generate maze using binary tree algorithm | |
for y in range(1, height, 2): | |
for x in range(1, width, 2): | |
maze[y][x] = 'path' |
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
from PIL import Image, ImageDraw | |
import random | |
class Cell: | |
wall_pairs = {'N': 'S', 'S': 'N', 'E': 'W', 'W': 'E'} | |
def __init__(self, x, y): | |
self.x, self.y = x, y | |
self.walls = {'N': True, 'S': True, 'E': True, 'W': 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
from blockchain import blockexplorer | |
from difflib import SequenceMatcher | |
def similar(a, b): | |
return SequenceMatcher(None, a, b).ratio() | |
def compare (forked_shitcoin_hashes): | |
winner = None | |
shitcoin_race_winner = 0 |
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
Babička měla syna a dvě dcery. Nejstarší žila mnoho let ve Vídni u přátel, od nichž se vdala. Druhá dcera šla pak na její místo. Syn řemeslník též byl již samostatným a přiženil se do městského domku. Babička bydlela v pohorské vesničce na slezských hranicích, žila spokojeně v malé chaloupce se starou Bětkou, která byla její vrstevnice a již u rodičů sloužila. | |
Nežila osamotnělá ve své chaloupce; všickni obyvatelé vesničtí byli bratřími jí a sestrami, ona jim byla matkou, rádkyní, bez ní se neskončil ani křest, ani svatba, ani pohřeb. | |
Tu najednou přišel babičce list z Vídně od nejstarší dcery, v němž jí vědomost dávala, že manžel její službu přijal u jedné kněžny, která má velké panství v Čechách, a sice jen několik mil vzdálenosti od pohorské vesničky, kde babička bydlí. Tam že se nyní s rodinou odstěhuje, manžel pak vždy jen přes léto že tam bude, když i paní kněžna se tam zdržuje. Ke konci listu stála vroucí prosba, aby babička k nim se odebrala navždy a živobytí svoje u dcery a vnoučat strávila, kteří se |
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 sys | |
import rawpy, imageio | |
files = sys.argv[1:] | |
for file in files: | |
with rawpy.imread(file) as raw: | |
rgb = raw.postprocess() | |
imageio.imsave(f'{file}.tiff', rgb) |
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
{ | |
"metadata": { | |
"configurationVersions": [ | |
6 | |
], | |
"clusterVersion": "1.258.87.20230120-140924" | |
}, | |
"id": "a630b218-1648-4efb-82d4-71e41b859695", | |
"dashboardMetadata": { | |
"name": "Best Practices Overview", |
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
try: | |
try: | |
try: | |
print(1/0) | |
except Exception as e: | |
raise(e) | |
except: | |
print("I will not raise") | |
except: | |
print("I never trigger") |
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 asyncio | |
pets = ["aliens", "cats", "dogs", "ostriches"] | |
def print_pet(pet): | |
print(pet) | |
async def main(): | |
await asyncio.gather(print_pet(pet) for pet in pets) |
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 asyncio | |
def static_hi(this): | |
"""this function is not asynchronous""" | |
return this | |
async def printer(): | |
"""notice arguments are not passed directly""" |
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
"D:\Hry\steamcmd\steamcmd.exe" +login anonymous +app_update 1110390 +exit | |
start "" "%~dp0ServerHelper.bat" +InternetServer/Ostrava |
NewerOlder