- Python >=3.5 (compiled with sqlite3 support)
- That’s it.
- This may have been a bad idea.
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 python2.7 | |
# -*- coding: utf-8 -*- | |
from __future__ import division, absolute_import, print_function, unicode_literals | |
from copy import deepcopy | |
from django.db 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
#!/usr/bin/env python2.7 | |
# -*- coding: utf-8 -*- | |
from __future__ import division, absolute_import, print_function, unicode_literals | |
from contextlib import contextmanager | |
from os import getpid | |
from random import getrandbits |
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 <algorithm> | |
#include <cstdint> | |
#include <cstdio> | |
#include <cstring> | |
using namespace std; | |
const uint64_t k[] = { | |
UINT64_C(0x428a2f98d728ae22), UINT64_C(0x7137449123ef65cd), UINT64_C(0xb5c0fbcfec4d3b2f), UINT64_C(0xe9b5dba58189dbbc), |
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
<html> | |
<body> | |
<script> | |
'use strict'; | |
ArrayBuffer.prototype.toSource = function(hex) { | |
var buf = this, | |
bytes = Array.prototype.slice.call(new Uint8Array(buf)), | |
i = buf.byteLength, | |
blank = true; |
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 dis | |
import inspect | |
class MethodMissingMixin: | |
def __getattr__(self, attr): | |
if hasattr(getattr(self, '__methodmissing__', None), '__call__'): | |
parent_frame = inspect.currentframe().f_back | |
instructions = dis.get_instructions(parent_frame.f_code) | |
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 z3 | |
def sym_xoroshiro128plus(solver, sym_s0, sym_s1, mask, result): | |
s0 = sym_s0 | |
s1 = sym_s1 | |
sym_r = (sym_s0 + sym_s1) | |
condition = z3.Bool('c0x%0.16x' % result) | |
solver.add(z3.Implies(condition, (sym_r & mask) == result & mask)) |
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
function splatify(func) { | |
args_string = func.toString().split('(')[1].split(')')[0].split(',').map(function(s) { return s.trim(); }); | |
if (args_string.length && args_string[args_string.length - 1] === 'splat_args') { | |
pivot = args_string.length - 1; | |
return function () { | |
if (arguments.length > pivot + 1) { | |
args = Array.prototype.slice.call(arguments, 0, pivot); | |
args.push(Array.prototype.slice.call(arguments, pivot)); |
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 os | |
from http.client import HTTPSConnection | |
from time import sleep | |
def request(): | |
connection = HTTPSConnection('httpbin.org') | |
connection.request('GET', '/headers') | |
return connection.getresponse().read() |
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
<html> | |
<head> | |
<style> | |
#left, #right, #test { | |
display: block; | |
z-index: 0; | |
} | |
#left { | |
float: left; |