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
| extends Camera2D | |
| @export var smoothing: float = 40.4 # more smoothing -> less camera movement | |
| var shaking: float = 0.0 | |
| var lastpos: Vector2 | |
| var has_velocity: bool | |
| func add_shaking(amount: float) -> void: |
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
| extends Node2D | |
| # When the camera is at the same (global) position as this object will be at the position | |
| # it is when the game starts or as it appears in the editor, unlike Parallax2D which starts | |
| # in the position it is in the editor and when the camera is at that location the object could | |
| # be anywhere. | |
| # | |
| # `scroll_scale` works as it does for Parallax2D. There is no repeat support. | |
| # | |
| # Put this on the object it you want to have parallax, or put it on a Node2D and put the object(s) |
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
| [12:16:11] [main/INFO]: Loading Minecraft 1.21.11 with Fabric Loader 0.18.4 | |
| [12:16:11] [main/INFO]: Loading 135 mods: | |
| - appleskin 3.0.8+mc1.21.11 | |
| - axiom 5.4.2 | |
| |-- com_moulberry_axiomclientapi 1.0.87 | |
| \-- com_moulberry_mixinconstraints 1.0.9 | |
| - bactromod 3.5 | |
| - carpet 1.4.194+v251223 | |
| - detailabreconst 5.2.0+1.21.9_11-fabric | |
| - dynamic_fps 3.11.4 |
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
| # effectively stolen from https://github.com/godot-extended-libraries/godot-debug-menu credit to Calinou :D | |
| # frametime_* is in milliseconds | |
| # fps_* is in frames per second (what else) | |
| var viewport_rid = get_viewport().get_viewport_rid() | |
| var frametime_cpu: int = RenderingServer.viewport_get_measured_render_time_cpu(viewport_rid) + RenderingServer.get_frame_setup_time_cpu() | |
| var frametime_gpu: int = RenderingServer.viewport_get_measured_render_time_gpu(viewport_rid) | |
| var fps_real: float = 1 / delta # assuming this is in _process, returns actual frame rate, capped at display refresh rate | |
| var fps_theo: float = 1000 / max(frametime_cpu, frametime_gpu) # frame rate that could be attained if there was no FPS cap |
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 | |
| HELP = """ | |
| python3 algorithm1.py -h | |
| show this very help page | |
| python3 algorithm1.py | |
| work out what's special about 495 | |
| python3 algorithm1.py <number> | |
| run the algorithm on <number> | |
| """ |
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
| scons: Reading SConscript files ... | |
| Enabling ALSA | |
| Enabling PulseAudio | |
| YASM is necessary for WebM SIMD optimizations. | |
| WebM SIMD optimizations are disabled. Check if your CPU architecture, CPU bits or platform are supported! | |
| Checking for C header file mntent.h... yes | |
| scons: done reading SConscript files. | |
| scons: Building targets ... | |
| run(["core/method_bind.gen.inc", "core/method_bind_ext.gen.inc"], ["core/make_binders.py"]) | |
| Compiling ==> platform/x11/godot_x11.cpp |
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 os | |
| import time | |
| import pygame | |
| from pygame.locals import * | |
| pygame.init() | |
| scr_w = 500 | |
| scr_h = 500 |
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
| "xkcd scream cipher implementation" | |
| import string | |
| As = ['\u0041', '\u00c0', '\u00c1', '\u00c2', '\u00c3', '\u00c4', '\u00c5', '\u0100', '\u0102', '\u0104', '\u01cd', '\u01de', '\u01e0', '\u01fa', '\u0200', '\u0202', | |
| '\u0226', '\u023a', '\u1e00', '\u1ea0', '\u1ea2', '\u1ea4', '\u1ea6', '\u1ea8', '\u1eaa', '\u1eac', '\u1eae', '\u1eb0', '\u1eb2', '\u1eb4', '\u1eb6' | |
| ] | |
| letters = [c for c in ',.()-'] + [c for c in string.ascii_lowercase] | |
| def encrypt(s: str) -> str: | |
| r = '' |