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
#include <iostream> | |
#include <vector> | |
class ElectronBurner { | |
public: | |
std::vector<int> stack { 0 }; | |
size_t size() { return stack.size(); } | |
ElectronBurner& operator++() { | |
if(size() < 1) return *this; | |
++stack.back(); |
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
codepage = "⊙⊚⊛⊡⋄∘⨕⨖⨞⫇⫈αβγδεζηθι !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~←↑→↓" #... | |
unicode_result = "" | |
with open("sample.txt", "rb") as f: | |
while (byte := f.read(1)): | |
unicode_result += codepage[ord(byte)] | |
print(unicode_result) |
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
// for compatibility with bignumbers/regular numbers | |
// getZero(5n) = 0n | |
// getZero(5) = 0 | |
let getZero = function (entity) { | |
return entity - entity; | |
} | |
let getOne = function (entity) { | |
let zero = getZero(entity); | |
zero++; | |
return zero; |
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
#!/usr/bin/env ruby | |
# == Duel Links DeckListGen == | |
# by Conor S. O'Brien | |
# | |
# == Licensing == | |
# Please note this code is licensed under CC BY-SA 4.0 (see the gist for the | |
# full text). This program is a tool, and thus the resulting images are not | |
# licensed. Do not claim the results of this program as your own work, and | |
# if you use these images in a stream, video, image compilation, etc., please | |
# credit me in the relevant content description with the expanded title of |
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
Symbol | Sequence | |
---|---|---|
A | 01 | |
B | 1000 | |
C | 1010 | |
D | 100 | |
E | 0 | |
F | 0010 | |
G | 110 | |
H | 0000 | |
I | 00 |
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
00000000: 5468 6973 2069 7320 616e 2065 7861 6d70 This is an examp | |
00000010: 6c65 2069 6e70 7574 2064 6573 6967 6e65 le input designe | |
00000020: 6420 746f 2073 7472 6573 7320 6120 6361 d to stress a ca | |
00000030: 7420 696e 7465 7270 7265 7465 722e 0a49 t interpreter..I | |
00000040: 7420 696e 636c 7564 6573 206e 6577 6c69 t includes newli | |
00000050: 6e65 7320 2822 5c6e 2229 2c20 7175 6f74 nes ("\n"), quot | |
00000060: 6573 2028 225c 2222 292c 2061 6e64 2075 es ("\""), and u | |
00000070: 6e62 616c 616e 6365 6420 6272 6163 6573 nbalanced braces | |
00000080: 2028 2829 2e0a 0a41 7320 7765 6c6c 2061 (()...As well a | |
00000090: 7320 656d 7074 7920 6c69 6e65 732e 0a00 s empty lines... |
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
# meta operators: meta<op> | |
# ! EXCLAMATION MARK | |
# factorial | |
# " QUOTATION MARK | |
# (list of characters) | |
# # NUMBER SIGN |
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
??{#Unique[±_<:BinBelow!#_:>Sum]} | |
data := Random[ | |
range := 10 | |
inner := Chunk[Sort[data], Floor@`/&range] | |
keys ' values := Tr[inner] | |
size := Max[Size => keys] + 3 | |
width := size + 2 | |
format_key[key] := "[" + Center[String[key], size] + "]" |
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
require 'zlib' | |
require 'base64' | |
FIELD_SEPARATOR = "\xff" | |
def deflate(str) | |
Zlib::Deflate.deflate(str,9)[2..-5] | |
end | |
def finalize(state_string) | |
compressed = deflate(state_string) | |
encoded = Base64.encode64 compressed |
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
alert([...document.querySelectorAll(".active-question-content__prompt p")].map((e,i)=>(a=e.textContent,(a.search(++i)?"":i+". ")+e.textContent)).join` | |
`) |
NewerOlder