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 scene import * | |
import sound | |
class MyScene (Scene): | |
def setup(self): | |
# This will be called before the first frame is drawn. | |
self.root_layer = Layer(self.bounds) | |
self.bullets = {} |
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 math | |
def permutation_count(k, n): | |
"Computes the number of k-element permutations in a sequence of length n." | |
return math.factorial(n) / math.factorial(n - k) |
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
;AHK v1 | |
#NoEnv | |
/* | |
MsgBox % BinaryToText(Temp1 := TextToBinary("Test")) . "`n" . Temp1 | |
MsgBox % BinaryToNumber(Temp1 := NumberToBinary(1234)) . "`n" . Temp1 | |
*/ | |
TextToBinary(ByRef InputText) | |
{ |
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
#NoEnv | |
/* | |
Basic example: | |
Heap := new BinaryHeap | |
For Index, Value In [10,17,20,30,38,30,24,34] | |
Heap.Add(Value) | |
MsgBox % Heap.Peek() | |
Loop, 8 |
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
#NoEnv | |
Gui, Font, s36, Arial | |
Gui, Add, Text, x10 y10 w760 h50 Center, MODSTER 2.0 | |
Gui, Font, s12 | |
Gui, Add, Groupbox, x10 y80 w760 h110, Where is the Minetest folder? | |
Gui, Font, s22 | |
Gui, Add, Edit, x20 y110 w690 h40 vMinetestPath gCheckMinetest | |
Gui, Add, Button, x710 y110 w50 h40 gSelectMinetest, ... |
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
// ==UserScript== | |
// @name uWaterloo Learn Login | |
// @namespace uberi | |
// @description Keep the user logged into LEARN while the tab is open | |
// @include https://learn.uwaterloo.ca/* | |
// @match https://learn.uwaterloo.ca/* | |
// @version 1.0 | |
// @run-at document-start | |
// ==/UserScript== |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
raycast3D = function(pos, dir, callback) | |
local base = {x=math.floor(pos.x), y=math.floor(pos.y), z=math.floor(pos.z)} | |
local stepx, stepy, stepz = 0, 0, 0 | |
local componentx, componenty, componentz = 0, 0, 0 | |
local intersectx, intersecty, intersectz = 0, 0, 0 | |
if dir.x == 0 then | |
intersectx = math.huge | |
elseif dir.x > 0 then | |
stepx = 1 |