Skip to content

Instantly share code, notes, and snippets.

View GRAYgoose124's full-sized avatar
🦎
Now descending, please wait...

grayson GRAYgoose124

🦎
Now descending, please wait...
View GitHub Profile
class BSTree:
def __init__(self):
self.root = None
def search(self, key, order='in'):
for node in self.traverse(order=order):
if node['key'] == key:
return node
def insert(self, key, data=None):
INFO] client: 92 | --> | PING :belay.foonetic.net
[ INFO] client: 166 | <-- | PONG :belay.foonetic.net
[ INFO] Log: 57 | Log written: #testgrounds
[ INFO] client: 92 | --> | PING :belay.foonetic.net
[ INFO] client: 166 | <-- | PONG :belay.foonetic.net
[ INFO] client: 92 | --> | :graygoose124!goose@hide-FCC91304.dhcp.snlo.ca.charter.com PRIVMSG #testgrounds :so
[ INFO] Simple: 32 | Simple Hook
[ INFO] client: 92 | --> | :graygoose124!goose@hide-FCC91304.dhcp.snlo.ca.charter.com PRIVMSG #testgrounds :when i type
[ INFO] Simple: 32 | Simple Hook
[ DEBUG] bot: 105 | Unknown command: when
import numpy as np
people = """David, Comp Sci, A
David, English, B
David, Chemistry, A
Laura, Chemistry, A
Henry, English, D
Henry, French, A
Henry, Art, B
Hegre, Chemistry, B
Born in Winter
Ocean Planet
A Sight to Behold
Inward Movement
Embrace the World
Global Warming
Fire is Everything
Where Dragons Dwell
Planned Obsolescence
The Way of all Flesh
# TODO: Document API, use this plugin as API example.
class SimplePlugin:
def privmsg_hook(self, handler, data):
if data['command'] != 'Say,':
return
response = " ".join(data['arguments'])
if data['orig_dest'][0] == "#":
[ INFO: irk.plugin] | | Plugin BrainFuck loaded.
[ INFO: irk.plugin] | | Plugin SimplePlugin loaded.
[ DEBUG: irk.plugin] | | Loaded plugins: [<BrainFuck.BrainFuck instance at 0x7fb1b697e3f8>, <SimplePlugin.SimplePlugin instance at 0x7fb1b697e488>]
[ DEBUG: irk.client] | O | SSL Cipher (AES256-SHA), SSL Version (TLSv1/SSLv3), SSL Bits (256)
[ INFO: irk.protocol] |<--| NICK DuckBorg
[ INFO: irk.protocol] |<--| USER duckborg 0 * graygoose124
[ INFO: irk.client] |-->| :anchor.foonetic.net NOTICE AUTH :*** Looking up your hostname...
[ INFO: irk.client] |-->| :anchor.foonetic.net NOTICE AUTH :*** Found your hostname
[ INFO: irk.client] |-->| PING :73C41293
[ INFO: irk.protocol] |<--| PONG :73C41293
%macro print_ 1
mov eax, 4
mov ebx, 1
mov ecx, %1
call print
%endmacro
%macro exit_ 1
mov eax, 1
;template.inc
%define sys_exit 1 ;ebx=errorcode
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
%define sys_read 3 ;ebx=filedescriptor, ecx=buffer, edx=buflen
%define sys_write 4
;file descriptors
%define stdin 0
%define stdout 1
%define stderr 2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; assemble: nasm -f elf _cat.asm
; link: ld -m elf_i386 -o _cat _cat.o
SECTION .bss ; mutable/modifiable variables
buf: resb 1
SECTION .text
global _start
_start:
mov eax, 3 ;sys_read
mov ebx, 0 ;stdin
call run