>>> # demonstration of how to solve an encoding puzzle:
>>> puzzle = "VGhlIHBhc3N3b3JkIGlzIGNvbXBvc2VkIG9mIHRoZSBmaXJzdCBsZXR0ZXIgb2YgZWFjaCB3b3JkIGluIHRoaXMgc2VudGVuY2UsIGluIG9yZGVyLCBhbGwgaW4gbG93ZXJjYXNl"
>>>
>>> # Step 1: Decode the puzzle
>>> puzzle_decoded = puzzle.decode('base64')
Traceback (most recent call last):
File "passw.py", line 8, in <module>
print(puzzle.decode('base64'))
LookupError: 'base64' is not a text encoding; use codecs.decode() to handle arbitrary codecs
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 os | |
from typing import Dict | |
import re | |
def parse_files(content: str) -> Dict[str, str]: | |
"""Parse the input content into a dictionary of filepath -> content.""" | |
files = {} | |
maybe_files = set() | |
current_file = None |
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
""" | |
- /room command handler | |
- /schedule command handler | |
- task - schedule | |
- weekly task - summary (w/ button handler) | |
- dashboard | |
- admin | |
""" | |
from django import models |
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
# Sequencer is the music production term of art for what this does | |
class Sequencer: | |
def toggle_record(self, value): | |
self.is_recording = value | |
if not value: | |
for note in self.held_notes.values(): | |
self.record_midi(midi.NoteOff(note.pitch, note.velocity)) | |
self.held_notes = {} | |
def handle_note(self, note): |
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
# Fork and refactor before you look at the official solution[1] or other players' forks | |
# [1]: https://bit.ly/ccot1solution | |
class PlayerRecorder: | |
def user_clicked_piano_note(self, value): | |
self.engine.send_note(value) | |
if self.play and self.r: | |
if value[0] == ON: | |
self.temp[value[1]] = value | |
elif value[0] == OFF: |
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
""" | |
Implementation of https://arxiv.org/pdf/1802.07068.pdf by Aur Saraf | |
""" | |
import random | |
def histogram(items): | |
counts = {} | |
for item in items: | |
if item not in counts: |
Loading
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
### Keybase proof | |
I hereby claim: | |
* I am sonoflilit on github. | |
* I am sonoflilit (https://keybase.io/sonoflilit) on keybase. | |
* I have a public key ASD1Caun2jjDgw-sJMliMwtosIDQchNMBCzL9G8vUMI48go | |
To claim this, I am signing this object: |
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 | |
def parse_parens(code): | |
result = {} | |
stack = [] | |
for i, c in enumerate(code): | |
if c == '[': | |
stack.append(i) | |
elif c == ']': | |
match = stack.pop() |
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
AA010000 | 0625 | |
---|---|---|
AA010002 | FE88 | |
AA010006 | F8FB | |
AA010009 | 0627 | |
AA020000 | 0649 | |
AA020002 | FEF0 | |
AA020009 | 0649 | |
AA050000 | 064E | |
AA050004 | FE77 | |
AA050009 | 064E |
NewerOlder