Skip to content

Instantly share code, notes, and snippets.

View lua-python-polyglot.txt
get = (sum and __import__ or require)('requests').get
url = "http://translate.googleapis.com/translate_a/single"
params = {}
params['client'] = 'gtx'
params['sl'] = 'en'
params['tl'] = 'de'
params['dt'] = 't'
params['q'] = 'hello!'
View memmemtest.cpp
#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <cstdlib>
#include <string>
#include <cassert>
#include <cstring>
#include <vector>
#include <chrono>
#include "muslmemmem.h"
View dec1make0-b.cpp
#include <vector>
#include <iostream>
#include <cstdio>
static unsigned minelem(const std::vector<unsigned>& a)
{
unsigned ret = static_cast<unsigned>(-1);
for(unsigned x : a)
if(x && x < ret)
ret = x;
View dec1make0.cpp
#include <vector>
#include <iostream>
#include <cstdio>
static bool isall0(const std::vector<unsigned>& a)
{
for(unsigned x : a)
if(x)
return false;
View disks.c
#include <windows.h>
#include <stdio.h>
typedef unsigned __int64 u64;
typedef unsigned u32;
static int isDiskAvailable(char upperLetter)
{
if(!('A' <= upperLetter && upperLetter <= 'Z'))
return 0;
View native.cpp
#include "native.hpp"
#define NOMINMAX
#include <windows.h>
#include <vector>
#include <cstring>
#include <algorithm>
#include <SFML/System/String.hpp>
sf::Image takeDesktopScreenshot()
{
View main.cpp
#ifdef _MSC_VER
#pragma warning(disable : 4503)
#endif
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
View main.py
from collections import defaultdict
class Transition:
def __init__(self, label, ins, outs):
self.label = label
self.inputs = frozenset(ins)
self.outputs = frozenset(outs)
def __repr__(self):
View merge.py
import os
import sys
def printf(fmt, *args):
print(fmt.format(*args), end='')
REPOS = [
'https://github.com/eliasdaler/imgui-sfml',
'https://github.com/ocornut/imgui',
View mars.lua
local io = require'io'
local math = require'math'
local function push(s, v) s[#s + 1] = v; return v end
local function top(s) return s[#s] end
local function pop(s) local r = top(s); s[#s] = nil; return r end
local function empty(s) return #s == 0 end
local function fixtoplist(stack)
local oldtop = top(stack)
You can’t perform that action at this time.