- GitHub Staff
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 util. | |
final(30) => true. | |
final(_) => false. | |
table(+,max,nt) | |
plan({M, _, _}, P, _), final(M) => P = 0. | |
plan({M, V, N}, P, D@{G, R, NtV}), R[N] > 0, V[NtV[N]] == false ?=> | |
plan({M+1, {cond(I == NtV[N], true, V[I]) : I in 1..V.len}, N}, P1, D), | |
P = P1 + R[N] * (29 - M). |
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
module Lexer = struct | |
type token = | |
Num of int | |
| Id | |
| Plus | |
| Minus | |
| Product | |
| Division | |
| Exponent | |
| LPar |
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
if 0: | |
if 0: | |
if 0: | |
if 0: | |
if 0: | |
if 0: | |
if 0: | |
if 0: | |
if 0: | |
if 0: |
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
public class A{public static void x(){ | |
if(0){ | |
if(0){ | |
if(0){ | |
if(0){ | |
if(0){ | |
if(0){ | |
if(0){ | |
if(0){ | |
if(0){ |
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 util, mip. | |
go(T, N, K, U, Xs) => | |
X = new_array(N), | |
X :: 0.0..1.0, | |
foreach(I in 1..N) | |
X[I] #>= Xs[I], | |
X[I] #<= Xs[I] + U | |
end, | |
sum(X) #<= sum(Xs) + U, |
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 python | |
import sys | |
from collections import Counter | |
from elftools.elf.elffile import ELFFile | |
from capstone import * | |
from capstone.x86 import * | |
def get_binary(file: str) -> (bytes, int): | |
with open(file, 'rb') as stream: |
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 pwn import * | |
for i in range(512, 768): | |
t = remote('xkcd_be4bf26fcb93f9ab8aa193efaad31c3b.quals.shallweplayaga.me', 1354) | |
t.send('SERVER, ARE YOU STILL THERE? IF SO, REPLY "' + 'A' * 512 + '" ({} LETTERS)\n'.format(i)) | |
print t.recvline() | |
t.close() |
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 <stdio.h> | |
int is_valid(unsigned char c) { | |
return c == 0 || c == 45 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c == 95 || c >= 97 && c <= 122; | |
} | |
int main () { | |
unsigned char h1[17] = {0x87, 0x29, 0x34, 0xC5, 0x55, 0xB0, 0xC2, 0x2D, 0xEE, 0x60, 0x34, 0xD4, 0x55, 0xEE, 0x80, 0x7C, 0}; | |
unsigned char h2[17] = {0xEE, 0x2F, 0x37, 0x96, 0x3D, 0xEB, 0x9C, 0x79, 0xEE, 0x2C, 0x33, 0x95, 0x78, 0xED, 0xC1, 0x2B, 0}; | |
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
module: string-aref-test | |
define function main () | |
let t = "abcdefg"; | |
let (a, b) = method() values(t[2], 'c') end(); | |
format-out("%= %=\n", a, b); | |
let (c, d) = values(t[2], 'c'); | |
format-out("%= %=\n", c, d); | |
let x = #[1, 2, 3, 4]; | |
let (e, f) = method() values(x[2], 'c') end(); |
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
(defun transform-expr (expr) | |
(if (symbolp expr) | |
(let ((s (symbol-name expr))) | |
(cond ((string-equal s "=") '+) | |
((string-equal s "@") '-) | |
(t expr))) | |
expr)) | |
(defun read-next-object (delimiter &optional (stream *standard-input*)) | |
(if (and delimiter (char= (peek-char t stream t nil t) delimiter)) |
NewerOlder