I hereby claim:
- I am sum-catnip on github.
- I am sum_catnip (https://keybase.io/sum_catnip) on keybase.
- I have a public key ASDhQh7Mx8TZN96gO70LppSJuZGEqEKH-UmOzymJxzRZzwo
To claim this, I am signing this object:
/// [dependencies] | |
/// calloop = "0.10.5" | |
/// | |
/// TODO: in the current implementation when you add a new handler | |
/// inside another handler | |
/// and then emit an event before all handlers have been called | |
/// the new handler will be called twice | |
/// gotta think about how to fix that | |
use std::cell::{ RefCell, RefMut }; |
from typing import Iterator, Optional | |
checked = set() | |
def check_inst(i: HighLevelILInstruction, const: int) -> Iterator[HighLevelILInstruction]: | |
if isinstance(i, Constant) and i.constant == const: yield i | |
for o in filter(lambda i: isinstance(i,HighLevelILInstruction), i.operands): | |
yield from check_inst(o, const) | |
def check_func(f: Function, const: int, depth_max: int, depth: int = 0) -> Iterator[HighLevelILInstruction]: |
<# | |
compiles an asm file into a c-style byte array | |
#> | |
param ( | |
# path to asm file | |
[parameter(mandatory=$true)] | |
[string]$path | |
) | |
$nasm = "$env:LOCALAPPDATA\bin\NASM\nasm.exe" |
# this is specific to the v8 js engine | |
# firefox actually does something slightly different so their encodings are incompatible | |
import sys | |
import math | |
import string | |
from functools import reduce | |
import numpy as np | |
from numpy import float64 as f64 |
local function doc(string) | |
return setmetatable({doc = string}, { | |
__concat = function(t, f) | |
if type(f) == 'function' | |
then t.func = f; return t | |
else f.doc = t.doc .. '\n' .. f.doc; return f | |
end | |
end, | |
__call = function(t, ...) return t.func(...) end | |
}) |
; challange: | |
; -------------------- | |
; Challenge #3 | |
; -------------------- | |
; Caesar Cipher | |
; | |
; You may know also this as ROT N. | |
; Your solution should input an arbitrary ROT cipher encoded string and output all shifts. | |
; The allowed alphabet is [a-zA-Z] any other characters are not shifted and output as is | |
; |
def switch(target, dict): | |
for k, v in dict.items(): | |
# could add pattern matching memes here | |
# instead of just equals | |
# or maybe the key could be a callable too which will return true or false | |
# that kinda would just be an if tho | |
if k == target: | |
v(target) | |
break |
use std::io; | |
use std::ptr; | |
use std::mem; | |
use std::io::Error; | |
use std::io::ErrorKind; | |
use std::path::Path; | |
use std::ffi::CString; | |
use winapi::um::winnt::HANDLE; | |
use winapi::um::memoryapi as wmem; |
<html> | |
<body> | |
<script> | |
w = window.open('', '_system', 'width=1, height=1'); | |
var q = '<html><head><title>kektop</title></head><body>kektop</body></html>' | |
w.document.body.innerHTML = q; | |
</script> | |
<body> | |
</html> |
I hereby claim:
To claim this, I am signing this object: